clinic_department_list.cs

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

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

using Sybase.DataWindow;

using SPRFrame;
using HPIResource;

namespace HPIResource.ClinicDepartment
{
    // 临床科室表
    public class Clinic_Department_List : Sybase.DataWindow.DataStore
    {
        public Clinic_Department_List()
        {
            //this.LibraryList = HPIR.PbdFile;
            //this.DataWindowObject = "dw_price_catalog";
            //this.SetTransaction(SPRF.GetDB());
        }

        #region 属性
        public int ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "id"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "id", value);
            }
        }
        public int F_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "f_id"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "f_id", value);
            }
        }
        public string NAME
        {
            get
            {
                if (this.RowCount == 0) return "NoData";
                return this.GetItemString(this.CurrentRow, "name");
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "name", value);
            }
        }
        public string CODE
        {
            get 
            {
                if (this.RowCount == 0) return "NoData";
                return this.GetItemString(this.CurrentRow, "code");
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "code",value);
            }
        }
        #endregion

        #region 取数据的方法
        public void SetDataById(int iId)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where id = " + iId.ToString();
            this.SetSqlSelect(SqlString);
        }
        public void SetDataByFId(int iFId)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where f_id = " + iFId.ToString()+" order by code";
            this.SetSqlSelect(SqlString);
        }
        #endregion
    }
}


⌨️ 快捷键说明

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