Example #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);
     }
 }
Example #2
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);
 }
Example #3
0
        private void BindYYGH()
        {
            try
            {
                string rq_begin = Dtp_Begin.Value.ToString("yyyy-MM-dd");
                string rq_end   = Dtp_End.Value.ToString("yyyy-MM-dd");
                string kh       = this.txtkh.Text.Trim();
                string sfzh     = this.Txt_Sfzh.Text.Trim();
                string ysid     = Convertor.IsNull(this.Lab_Doctor.SelectedValue, "0");
                string ksid     = Convertor.IsNull(this.Lab_Dept.SelectedValue, "0");
                int    klx      = Convert.ToInt32(Convertor.IsNull(this.cmbklx.SelectedValue, "0"));
                Mz_YYgh.YYgh_Status yystatus = new Mz_YYgh.YYgh_Status();
                if (Rdo_Zt_All.Checked)
                {
                    yystatus = Mz_YYgh.YYgh_Status.所有记录;
                }
                else if (Rdo_Zt_Wqh.Checked)
                {
                    yystatus = Mz_YYgh.YYgh_Status.未作废未取号记录;
                }
                else if (Rdo_Zt_Wzf.Checked)
                {
                    yystatus = Mz_YYgh.YYgh_Status.未作废记录;
                }
                else if (Rdo_Zt_Yqh.Checked)
                {
                    yystatus = Mz_YYgh.YYgh_Status.未作废已取号记录;
                }
                else if (Rdo_Zt_Yzf.Checked)
                {
                    yystatus = Mz_YYgh.YYgh_Status.已作废记录;
                }
                int    err_code = 0;
                string err_text = string.Empty;
                #region 注释代码

                /*
                 * DataTable dt_yyinfo = ts_mz_class.Mz_YYgh.GetYYghInfo("", sfzh, kh, "", yystatus, rq_begin, rq_end, klx, out err_code, out err_text, InstanceForm.BDatabase);
                 * //由于存储过程没有加预约类型条件所以此处在前台过滤
                 * DataRow[] drs = null;
                 * string yylx= Convertor.IsNull( this.Cmb_Type.SelectedValue,"0");
                 * DataTable dt_order = dt_yyinfo.Clone();
                 * string filter ="1=1";
                 * if (yylx != "0")
                 * {
                 *  filter = "yylx=" + yylx + "";
                 * }
                 * //前台过滤科室
                 * if (ksid!="0")
                 * {
                 *  filter += " AND GHKS=" + ksid + "";
                 * }
                 * //前台过滤医生
                 * if (ysid!="0")
                 * {
                 *  filter += " AND GHYS=" + ysid + "";
                 * }
                 * if (filter != "1=1")
                 * {
                 *  drs = dt_yyinfo.Select(filter);
                 *  for (int i = 0; i < drs.Length; i++)
                 *      dt_order.Rows.Add(drs[i].ItemArray);
                 * }
                 * else
                 *  dt_order = dt_yyinfo.Copy();
                 *
                 * Fun.AddRowtNo(dt_order,"序号",true);
                 * this.Dgv_OrderInfo.DataSource = dt_order;
                 */
                #endregion
                //存储过程里将条件去除 Modify By zp 2014-10-08
                Mz_YYgh.YYgh_Sort _sort = new Mz_YYgh.YYgh_Sort();
                switch (Convertor.IsNull(this.Cmb_Type.SelectedValue, "0"))
                {
                case "1":
                    _sort = Mz_YYgh.YYgh_Sort.院内预约;
                    break;

                case "2":
                    _sort = Mz_YYgh.YYgh_Sort.网上预约;
                    break;

                case "3":
                    _sort = Mz_YYgh.YYgh_Sort.电话预约;
                    break;

                case "4":
                    _sort = Mz_YYgh.YYgh_Sort.医生站预约;
                    break;

                default:
                    _sort = Mz_YYgh.YYgh_Sort.所有预约方式;
                    break;
                }
                int       _ksid     = int.Parse(ksid);
                int       _ysid     = int.Parse(ysid);
                DataTable dt_yyinfo = Mz_YYgh.GetYYghInfo("", sfzh, kh, "", yystatus, rq_begin, rq_end, klx, _ksid, _ysid, _sort, out err_code, out err_text, InstanceForm.BDatabase);
            }
            catch (Exception ea)
            {
                MessageBox.Show("获取预约信息出现异常!原因:" + ea.Message, "提示");
            }
        }