⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clinicdoctor.cs

📁 .net 开发的基础框架
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;

using Sybase.DataWindow;

using SPRFrame;
using HPIResource;

namespace HPIResource.ClinicDoctor
{
    // 临床医生
    public class ClinicDoctor : Sybase.DataWindow.DataStore
    {
        string SqlString;
        public ClinicDoctor()
        {
            this.LibraryList = HPIR.PbdFile;
            this.DataWindowObject = "dw_ClinicDoctor";
            this.SetTransaction(SPRF.GetDB());
            SqlString = this.GetSqlSelect();
        }

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

        #region 属性
        public int ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "user_id"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "user_id", value);
            }
        }
        public string UserNo
        {
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "user_no");
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "user_no", value);
            }
        }
        public string UserName
        {
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "user_name");
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "user_name", value);
            }
        }
        public string STS
        {
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "sts");
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "sts", value);
            }
        }
        public int DeptID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "dep_id"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "dep_id", value);
            }
        }
        #endregion

        #region 取数据的方法
        public void SetDataById(int iId)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where user_id = " + iId.ToString();
            this.SetSqlSelect(SqlString);
        }
        public void SetDataByUserNo(string sNo)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where user_no = '" + sNo + "' order by user_id";
            this.SetSqlSelect(SqlString);
        }
        #endregion
    }
}



⌨️ 快捷键说明

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