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

📄 reglist.cs

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

namespace HPIResource.Register
{
    // 挂号信息
    public class RegList:DataStore
    {
                // 诊别
        string strSQl = "";
        public RegList()
        {
            this.LibraryList = HPIR.PbdFile;
            this.DataWindowObject = "dw_Reg_Query";
            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;
                }
            }
        }
        public int RegDate
        {
            get
            {
                if (this.RowCount == 0) return -1;
                try
                {
                    return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "RegDate"));
                }
                catch
                {
                    return 0;
                }
            }
        }
        public int CD_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                try
                {
                    return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "RegDept"));
                }
                catch
                {
                    return 0;
                }
            }
        }
        public int CD2_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                try
                {
                    return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "RegDept_2"));
                }
                catch
                {
                    return 0;
                }
            }
        }
        public int Doct_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                try
                {
                    return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "RegDoctor"));
                }
                catch
                {
                    return 0;
                }
            }
        }
        public string RegType
        {
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "RegType");
                }
                catch
                {
                    return "";
                }
            }
        }
        #endregion

        #region 方法
        public void SetDataByDate(int iDate)
        {
            this.ResetSQL();
            string s = this.GetSqlSelect();
            int i = s.IndexOf("WHERE");
            string s1 = s.Substring(0, i + 5);
            string s2 = s.Substring(i + 6, s.Length - i - 6);
            s = s1 + " ( regdate =" + iDate.ToString()  + ") and " + s2;
            this.SetSqlSelect(s);
        }
        public void SetDataByDate(int sDate,int eDate)
        {
            this.ResetSQL();
            string s = this.GetSqlSelect();
            int i = s.IndexOf("WHERE");
            string s1 = s.Substring(0, i + 5);
            string s2 = s.Substring(i + 6, s.Length - i - 6);
            s = s1 + " ( regdate >=" + sDate.ToString() + ") and ( regdate <=" + eDate.ToString()+") and " + s2;
            this.SetSqlSelect(s);
        }
        public void SetDataByPatID(string sPatID)
        {
            this.ResetSQL();
            string s = this.GetSqlSelect();
            int i = s.IndexOf("WHERE");
            string s1 = s.Substring(0, i + 5);
            string s2 = s.Substring(i + 6, s.Length - i - 6);
            s = s1 + " ( patient_id = '" + sPatID + "') and " + s2;
            this.SetSqlSelect(s);
        }
        #endregion
    }
}

⌨️ 快捷键说明

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