Exemple #1
0
        private void CauHinh()
        {
            try
            {
                UIAction.SetText(this.lblMessage, _QMSProperties.TenBenhVien);
                //txtSoKham.BackColor = _QMSProperties.MauB1;
                //txtSoKham.ForeColor = _QMSProperties.MauF1;

                //txtSoKhamYeuCau.BackColor = _QMSProperties.MauB2;
                //txtSoKhamYeuCau.ForeColor = _QMSProperties.MauF2;

                //txtSoKhamUuTien.BackColor = _QMSProperties.MauB3;
                //txtSoKhamUuTien.ForeColor = _QMSProperties.MauF3;

                pnlBHYT.Visible         = _QMSProperties.hienthiLaysoBHYT;
                pnlSoDVthuong.Visible   = _QMSProperties.hienthiLaysoDV;
                pnlSokhac.Visible       = _QMSProperties.hienthiLaysokhac;
                pnlUutien.Visible       = _QMSProperties.hienthiLaysoUutien;
                pnlSokhacUutien.Visible = _QMSProperties.hienthiLaysokhacUutien;

                cmdGetSoKham.Text          = _QMSProperties.tensodichvu;
                cmdKhamUuTien.Text         = _QMSProperties.tensouutien;
                cmdSotiemchung.Text        = _QMSProperties.tensokhac;
                cmdSotiemchung_uutien.Text = _QMSProperties.tensokhacUutien;
                cmdgetBHYT.Text            = _QMSProperties.tensobhyt;
            }
            catch (Exception ex)
            {
            }
        }
Exemple #2
0
 public void InitControl()
 {
     try
     {
         int    soluotkham = Utility.Int32Dbnull(dtSttKham.Compute("SUM(so_luong)", KcbDangkyKcb.Columns.IdKhoakcb + "=" + id_khoakcb.ToString()), 0);
         string str        = Utility.sDbnull(soluotkham, "0");
         if (Utility.Int32Dbnull(soluotkham, 0) < 10)
         {
             str = Utility.FormatNumberToString(soluotkham, "00");
         }
         UIAction.SetText(lblTotal, str);
         flowLayoutPanel1.Controls.Clear();
         foreach (DataRow dr in dtBuongkham.Rows)
         {
             ucQMSItem _ucQMSItem = new ucQMSItem(Utility.Int32Dbnull(dr[DmucDichvukcb.Columns.IdKhoaphong], 0), Utility.sDbnull(dr[DmucKhoaphong.Columns.MaKhoaphong], "KKB"), Utility.Int32Dbnull(dr[DmucDichvukcb.Columns.IdKieukham], 0),
                                                  Utility.Int32Dbnull(dr[DmucDichvukcb.Columns.IdPhongkham], 0), Utility.Int32Dbnull(dr[DmucDichvukcb.Columns.IdDichvukcb], 0), Utility.sDbnull(dr["ten_hienthi"]), _QMSProperties, ma_doituong_kcb, 0);
             _ucQMSItem._OnCreatedQMSNumber += _ucQMSItem__OnCreatedQMSNumber;
             DataRow[] arrDr = dtSttKham.Select(KcbDangkyKcb.Columns.IdKhoakcb + "=" + _ucQMSItem.id_KhoaKcb.ToString() + " AND " + KcbDangkyKcb.Columns.IdPhongkham + "=" + _ucQMSItem.id_phongkham.ToString());
             //if (arrDr.Length > 0)
             //{
             DataTable dtSTTKhamItem = dtSttKham.Clone();
             if (arrDr.Length > 0)
             {
                 dtSTTKhamItem = arrDr.CopyToDataTable();
             }
             _ucQMSItem.Init(dtSTTKhamItem);
             flowLayoutPanel1.Controls.Add(_ucQMSItem);
             //}
         }
     }
     catch (Exception ex)
     {
     }
 }
Exemple #3
0
        public void Init(DataRow dr, int id_KhoaKcb, int id_kieukham, int id_phongkham, string tenhienthi, QMSProperties _QMSProperties, string ma_doituong_kcb, int SoUutien)
        {
            this._QMSProperties = _QMSProperties;
            this.tenhienthi     = tenhienthi;
            setControlProperties();
            cmdGetQMS.Text       = tenhienthi;
            this.id_KhoaKcb      = id_KhoaKcb;
            this.id_kieukham     = id_kieukham;
            this.id_phongkham    = id_phongkham;
            this.ma_doituong_kcb = ma_doituong_kcb;
            this.SoUutien        = SoUutien;

            if (dr == null)
            {
                UIAction.SetText(lblQMSNumber, "0");
            }
            else
            {
                string str = Utility.sDbnull(dr["STT_KHAM"], "0");
                if (Utility.Int32Dbnull(dr["STT_KHAM"], 0) < 10)
                {
                    str = Utility.FormatNumberToString(Utility.Int32Dbnull(dr["STT_KHAM"], 0), "00");
                }
                UIAction.SetText(lblQMSNumber, str);
            }
            hasLoaded = true;
        }
Exemple #4
0
        void _ucQMSItem__OnCreatedQMSNumber(string MaxNumber)
        {
            DataTable dtSttKham  = SPs.QmsLayMaxSTTKham(id_khoakcb, -1).GetDataSet().Tables[0];
            int       soluotkham = Utility.Int32Dbnull(dtSttKham.Compute("SUM(so_luong)", KcbDangkyKcb.Columns.IdKhoakcb + "=" + id_khoakcb.ToString()), 0);
            string    svalue     = "";

            if (soluotkham < 10)
            {
                svalue = Utility.FormatNumberToString(soluotkham, "00");
            }
            else
            {
                svalue = soluotkham.ToString();
            }
            UIAction.SetText(lblTotal, svalue);
        }
Exemple #5
0
 void LoadSTTKham()
 {
     if (dtSTTKham == null)
     {
         UIAction.SetText(lblQMSNumber, "00");
     }
     else
     {
         DataRow[] arrDr = dtSTTKham.Select(KcbQm.Columns.LoaiQms + "=" + (chkSoUutien.IsChecked ? "1" : "0"));
         if (arrDr.Length > 0)
         {
             string str = Utility.sDbnull(arrDr[0]["STT_KHAM"], "0");
             if (Utility.Int32Dbnull(arrDr[0]["STT_KHAM"], 0) < 10)
             {
                 str = Utility.FormatNumberToString(Utility.Int32Dbnull(arrDr[0]["STT_KHAM"], 0), "00");
             }
             UIAction.SetText(lblQMSNumber, str);
         }
         else
         {
             UIAction.SetText(lblQMSNumber, "00");
         }
     }
 }
Exemple #6
0
 private void CauHinh()
 {
     UIAction.SetText(this.lblMessage, _QMSProperties.TenBenhVien);
     UpdateQMSItems();
 }