Пример #1
0
        private void grv_DichVu_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            int row   = grv_DichVu.FocusedRowHandle;
            int _maDV = 0;

            _dichvu = new DichVu();
            _c5084  = new C5084();
            resetDV();
            resetDV_Cv();
            if (row >= 0 && grv_DichVu.GetRowCellValue(row, colMaDV) != null)
            {
                _maDV = Convert.ToInt32(grv_DichVu.GetRowCellValue(row, colMaDV));
                getDVByMaDV(_maDV);
            }
            lblThongBao.Text      = "";
            lblThongBao.ForeColor = Color.Green;
        }
Пример #2
0
 private bool getDVByIDDV_5084(int _idDV)
 {
     _c5084 = new C5084();
     data   = new Hospital();
     setCheck(true);
     if (_idDV > 0)
     {
         _lC5084              = data.C5084.OrderBy(p => p.idDichVu).ToList();
         _c5084               = _lC5084.Single(p => p.idDichVu == _idDV);
         txtMaDvQD_Cv.Text    = _c5084.MaDV;
         txtTenDV_CV.Text     = _c5084.TenDV;
         txtHamLuong_CV.Text  = _c5084.HamLuong;
         txtDonViTinh_CV.Text = _c5084.DonViTinh;
         txtHoatChat_CV.Text  = _c5084.HoatChat;
         txtDuongDung_CV.Text = getDuongDung(_c5084.MaDuongDung);
         txtSDK_CV.Text       = _c5084.SoDangKy;
         txtNhaSX_CV.Text     = getTenDonVi(_c5084.MaCtySX);
         txtNoiDK_CV.Text     = getTenDonVi(_c5084.MaCtyDk);
         txtDongGoi_CV.Text   = _c5084.DongGoi;
         txtTieuChuan_CV.Text = _c5084.TieuChuan;
         txtTuoiTho_CV.Text   = _c5084.TuoiTho;
         txtSLuong_CV.Text    = "";
         //thiếu mã khoa
         txtSoQD_CV.Text = "";//Số quyết định trúng thầu
         if (string.IsNullOrEmpty(txtMaDvQD_Cv.Text))
         {
             ck_MaDvQD_Cv.Checked = false;
         }
         if (string.IsNullOrEmpty(txtTenDV_CV.Text))
         {
             ck_TenDV_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtHamLuong_CV.Text))
         {
             ck_HamLuong_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtDonViTinh_CV.Text))
         {
             ck_DonViTinh_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtHoatChat_CV.Text))
         {
             ck_HoatChat_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtDuongDung_CV.Text))
         {
             ck_DuongDung_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtSDK_CV.Text))
         {
             ck_SDK_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtNhaSX_CV.Text))
         {
             ck_NhaSX_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtNoiDK_CV.Text))
         {
             ck_NoiDK_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtDongGoi_CV.Text))
         {
             ck_DongGoi_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtTieuChuan_CV.Text))
         {
             ck_TieuChuan_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtTuoiTho_CV.Text))
         {
             ck_TuoiTho_CV.Checked = false;
         }
         if (string.IsNullOrEmpty(txtSLuong_CV.Text))
         {
             ck_SLuong_CV.Checked = false;
         }
         return(true);
     }
     else
     {
         setCheck(false);
         return(false);
     }
 }