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) { } }
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) { } }
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; }
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); }
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"); } } }
private void CauHinh() { UIAction.SetText(this.lblMessage, _QMSProperties.TenBenhVien); UpdateQMSItems(); }