invdetail.cs

来自「.net 开发的基础框架」· CS 代码 · 共 85 行

CS
85
字号
using System;
using System.Collections.Generic;
using System.Text;
using Sybase.DataWindow;
using SPRFrame;

namespace HPIResource.ShouFei
{
    public class InvDetail:DataStore
    {
        string strSQl = "";
        public InvDetail()
        {
            this.LibraryList = HPIR.PbdFile;
            this.DataWindowObject = "dw_invdetail_list";
            this.SetTransaction(SPRF.GetDB());
            strSQl = this.GetSqlSelect();
        }

        public void ResetSQL()
        {
            this.SetSqlSelect(strSQl);
        }

        #region 属性
        public int ID
        {// 内部编号
            get
            {
                if (this.RowCount == 0) return -1;
                try
                {
                    return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "id"));
                }
                catch
                {
                    return 0;
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "id", value);
            }
        }
        public string Inv_Code
        {// 分类
            get
            {
                if (this.RowCount == 0) return "NoData";
                return this.GetItemString(this.CurrentRow, "Inv_Code");
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "Inv_Code", value);
            }
        }
        public double SUM_YS
        {// 应收金额
            get
            {
                if (this.RowCount == 0) return 0;
                return this.GetItemDouble(this.CurrentRow, "SUM_YS");
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "SUM_YS", value);
            }
        }
        #endregion

        #region 取数据的方法
        public void SetDataById(int ID)
        {
            this.ResetSQL();
            string SqlString = this.GetSqlSelect();
            SqlString += "where id = " + ID.ToString();
            this.SetSqlSelect(SqlString);
        }
        #endregion
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?