Пример #1
0
 private void GetChanDoan(string ICD_chinh, string IDC_Phu, ref string ICD_Name, ref string ICD_Code)
 {
     try
     {
         List <string>      lstICD = ICD_chinh.Split(',').ToList();
         DmucBenhCollection _list  =
             new DmucBenhController().FetchByQuery(
                 DmucBenh.CreateQuery().AddWhere(DmucBenh.MaBenhColumn.ColumnName, Comparison.In, lstICD));
         foreach (DmucBenh _item in _list)
         {
             ICD_Name += _item.TenBenh + ";";
             ICD_Code += _item.MaBenh + ";";
         }
         lstICD = IDC_Phu.Split(',').ToList();
         _list  =
             new DmucBenhController().FetchByQuery(
                 DmucBenh.CreateQuery().AddWhere(DmucBenh.MaBenhColumn.ColumnName, Comparison.In, lstICD));
         foreach (DmucBenh _item in _list)
         {
             ICD_Name += _item.TenBenh + ";";
             ICD_Code += _item.MaBenh + ";";
         }
         if (ICD_Name.Trim() != "")
         {
             ICD_Name = ICD_Name.Substring(0, ICD_Name.Length - 1);
         }
         if (ICD_Code.Trim() != "")
         {
             ICD_Code = ICD_Code.Substring(0, ICD_Code.Length - 1);
         }
     }
     catch
     {
     }
 }
Пример #2
0
        private void GetData()
        {
            DmucBenh objDisease = DmucBenh.FetchByID(Utility.Int32Dbnull(txtDiease_ID.Text, -1));

            if (objDisease != null)
            {
                txtsDesc.Text               = objDisease.MotaThem;
                txtDieaseCode.Text          = objDisease.MaBenh;
                txtDieaseName.Text          = objDisease.TenBenh;
                cboDieaseType.SelectedIndex = Utility.GetSelectedIndex(cboDieaseType,
                                                                       objDisease.MaLoaibenh.ToString());
            }
        }
Пример #3
0
 /// <summary>
 /// Bắt sự kiện khi thêm mới thông tin
 /// </summary>
 private void PerformActionInsert()
 {
     try
     {
         DmucBenh.Insert(txtDieaseCode.Text, Utility.sDbnull(cboDieaseType.SelectedValue, "-1"), Utility.sDbnull(txtDieaseName.Text, ""), txtsDesc.Text, "");
         DataRow dr = m_dtDisease.NewRow();
         dr[DmucBenh.Columns.IdBenh]     = Utility.Int16Dbnull(_Query.GetMax(DmucBenh.Columns.IdBenh), -1);
         dr[DmucBenh.Columns.MaBenh]     = txtDieaseCode.Text;
         dr[DmucBenh.Columns.TenBenh]    = Utility.sDbnull(txtDieaseName.Text, "");
         dr[DmucBenh.Columns.MaLoaibenh] = Utility.Int16Dbnull(cboDieaseType.SelectedValue, -1);
         dr[DmucBenh.Columns.MotaThem]   = Utility.sDbnull(txtsDesc.Text, "");
         dr["ten_loaibenh"] = Utility.sDbnull(cboDieaseType.Text, "");
         m_dtDisease.Rows.Add(dr);
         m_dtDisease.AcceptChanges();
         globalVariables.gv_dtDmucBenh.ImportRow(dr);
         Utility.GonewRowJanus(grdDiease, DmucBenh.Columns.IdBenh, Utility.sDbnull(dr[DmucBenh.Columns.IdBenh], "-1"));
         this.Close();
     }
     catch
     {}
 }
Пример #4
0
        public void Insert(string MaBenh,string MaLoaibenh,string TenBenh,string MotaThem,string Viettat)
        {
            DmucBenh item = new DmucBenh();

            item.MaBenh = MaBenh;

            item.MaLoaibenh = MaLoaibenh;

            item.TenBenh = TenBenh;

            item.MotaThem = MotaThem;

            item.Viettat = Viettat;

            item.Save(UserName);
        }
Пример #5
0
        public void Update(short IdBenh,string MaBenh,string MaLoaibenh,string TenBenh,string MotaThem,string Viettat)
        {
            DmucBenh item = new DmucBenh();
            item.MarkOld();
            item.IsLoaded = true;

            item.IdBenh = IdBenh;

            item.MaBenh = MaBenh;

            item.MaLoaibenh = MaLoaibenh;

            item.TenBenh = TenBenh;

            item.MotaThem = MotaThem;

            item.Viettat = Viettat;

            item.Save(UserName);
        }