formitemf_edit.cs

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

CS
122
字号
using System;
using System.Collections.Generic;
using System.Text;

using Sybase.DataWindow;

using SPRFrame;
using HPIResource;

namespace HPIResource.HisForm
{
    // 申请单项目关联收费
    public class FormItemF_Edit : Sybase.DataWindow.DataStore
    {
        public FormItemF_Edit()
        {
            this.LibraryList = HPIR.PbdFile;
            this.DataWindowObject = "dw_formitem_f_edit";
            this.SetTransaction(SPRF.GetDB());
        }

        #region 属性
        public int FORM_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                try
                {
                    return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "form_id"));
                }
                catch
                {
                    return 0;
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "form_id", value);
            }
        }
        public int ITEM_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "item_id"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "item_id", value);
            }
        }
        public int XH
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "xh"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "xh", value);
            }
        }
        public string F_CODE
        {
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "feiyong_code");
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "feiyong_code", value);
            }
        }
        public double NUM
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return this.GetItemDouble(this.CurrentRow, "num");
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "num", value);
            }
        }

        #endregion

        #region 取数据的方法
        public void SetDataById(int iId)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where item_id = " + iId.ToString() + " order by xh";
            this.SetSqlSelect(SqlString);
        }

        #endregion
    }
}






⌨️ 快捷键说明

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