Ejemplo n.º 1
0
 /// <summary>
 /// 医生站传输  构造函数
 /// </summary>
 /// <param name="menuTag"></param>
 /// <param name="chineseName">窗体text值</param>
 /// <param name="mdiParent"></param>
 /// <param name="_user">当前用户</param>
 /// <param name="yylx">预约类型</param>
 /// <param name="deptid">科室id</param>
 /// <param name="ysid">医生id</param>
 public Frm_OrderRegist(MenuTag menuTag, string chineseName, Form mdiParent, User _user, Mz_YYgh.YYgh_Sort yylx, int deptid, string cardno, string klx, RelationalDatabase db)
 {
     InitializeComponent();
     if (db != null)
     {
         InstanceForm.BDatabase = db;
     }
     _menuTag               = menuTag;
     _chineseName           = chineseName;
     this.Text              = _chineseName;
     _currentuser           = _user;
     _CurrentYylx           = yylx;
     _currentdeptid         = deptid;
     cmb_sxw.SelectedIndex  = 0;
     this.cmbghjb.Enabled   = false;
     this.Lab_Doctor.Enable = false;
     this.Lab_Dept.Enable   = false;
     this.cmb_sxw.Enabled   = false;
     _orderMeans            = new Order_Web(_cfg3059);
     _CurrentYylx           = yylx;
     //添加卡类型
     FunAddComboBox.AddKlx(false, 0, cmbklx, InstanceForm.BDatabase);
     if (!string.IsNullOrEmpty(cardno))
     {
         this.cmbklx.SelectedValue = klx;
         this.txtkh.Text           = cardno;
         this.txtkh.Enabled        = false;
         this.cmbklx.Enabled       = false;
         SetControls(cardno);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 释放预约资源
        /// </summary>
        /// <param name="_cfg3059"></param>
        /// <param name="_DataBase"></param>
        public static void UpdateYyResource(SystemCfg _cfg3059, RelationalDatabase _DataBase)
        {
            /*释放指定时间段内还未取号的预约资源,如当前时间为8点 8点半的号还未进行取号 如果参数设置为
             * 半个小时未取号就释放,则释放八点半的号源*/
            string    sql        = @"  SELECT convert(varchar(10),getdate(),120),
            convert(varchar(16),DATEADD(MINUTE,(SELECT CAST(CONFIG AS INT)
            FROM JC_CONFIG WHERE ID=1127),GETDATE()),120),
            SUBSTRING(convert(varchar(16),getdate(),120),11,16) ";
            DataTable dt_Date    = _DataBase.GetDataTable(sql);
            string    Date_Now   = dt_Date.Rows[0][0].ToString();
            string    Time_Now   = dt_Date.Rows[0][1].ToString();
            string    HourMinute = dt_Date.Rows[0][2].ToString();

            sql = @"SELECT *,substring(YYSD,1,5) AS KSSJ ,substring(YYSD,7,5) as JSSJ FROM MZ_YYGHLB 
            WHERE CONVERT(VARCHAR(10),YYRQ,120)='" + Date_Now + @"' AND substring('" + Time_Now + @"',12,len('" + Time_Now + @"')) >=
            substring(YYSD,7,5) AND BQHBZ=0 AND BSCBZ=0";
            //获取需要释放资源的预约记录
            DataTable dt_YYxx     = _DataBase.GetDataTable(sql);
            Order_Web _orderMeans = new Order_Web(_cfg3059);

            for (int i = 0; i < dt_YYxx.Rows.Count; i++)
            {
                /*作废预约信息,但是要根据时间判断是否释放分时段信息,如果预约的分时段
                 * 结束时间小于当前时间则不需要释放
                 */
                try
                {
                    string ptid  = Convertor.IsNull(dt_YYxx.Rows[i]["PTID"], "");
                    string qhyzm = dt_YYxx.Rows[i]["YZM"].ToString();
                    string czyh  = dt_YYxx.Rows[i]["DJY"].ToString();
                    string msg   = "";
                    _orderMeans.CancelOrder(ptid, qhyzm, czyh, ref msg);
                    //撤销预约后,需要对分时段资源进行处理
                    //获取资源id
                    int           ghks      = Convert.ToInt32(dt_YYxx.Rows[i]["GHKS"]);
                    int           ghjb      = Convert.ToInt32(dt_YYxx.Rows[i]["GHJB"]);
                    int           ghys      = Convert.ToInt32(dt_YYxx.Rows[i]["GHYS"]);
                    string        yydate    = dt_YYxx.Rows[i]["YYRQ"].ToString();
                    VisitResource _Resource = new VisitResource(ghks, ghjb, ghys, yydate, _DataBase);
                    if (_Resource.Resid <= 0)
                    {
                        return;
                    }

                    string kssj = dt_YYxx.Rows[i]["KSSJ"].ToString().Trim();
                    string jssj = dt_YYxx.Rows[i]["JSSJ"].ToString().Trim();
                    FsdClass.UpdateFsdStatus(_Resource.Resid, kssj, jssj, yydate, _DataBase);
                }
                catch (Exception ea)
                {
                    throw ea;
                }
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 ///构造函数
 /// </summary>
 /// <param name="menuTag"></param>
 /// <param name="chineseName"></param>
 /// <param name="mdiParent"></param>
 /// <param name="_user"></param>
 /// <param name="yylx">预约类型</param>
 public Frm_OrderRegist(MenuTag menuTag, string chineseName, Form mdiParent, User _user, Mz_YYgh.YYgh_Sort yylx)
 {
     InitializeComponent();
     _menuTag              = menuTag;
     _chineseName          = chineseName;
     _mdiParent            = mdiParent;
     this.Text             = _chineseName;
     _currentuser          = _user;
     _CurrentYylx          = yylx;
     cmb_sxw.SelectedIndex = 0;
     _orderMeans           = new Order_Web(_cfg3059);
     //添加卡类型
     FunAddComboBox.AddKlx(false, 0, cmbklx, InstanceForm.BDatabase);
 }