private void cmdAdd_Click(object sender, EventArgs e) { try { if (!Utility.isValidGrid(grdList) ) return; frm_ChonDoituongKCB frm = new frm_ChonDoituongKCB(); string KTH = Utility.sDbnull(cboKhoaTH.SelectedValue, "-1") == "-1" ? "ALL" : Utility.sDbnull(cboKhoaTH.SelectedValue, "-1"); frm._enObjectType = enObjectType.Thuoc; frm.m_dtObjectDataSource = m_dtQheDoituongThuoc; frm.Original_Price = Utility.DecimaltoDbnull(grdList.CurrentRow.Cells[DmucThuoc.Columns.DonGia].Value, 0); frm.MaKhoaTHIEN = KTH; frm.DetailService = Utility.Int32Dbnull(grdList.CurrentRow.Cells[DmucThuoc.Columns.IdThuoc].Value, 0); frm.ShowDialog(); if (!frm.m_blnCancel) cmdSaveObjectAll_Click(cmdSaveObjectAll, e); ModifyCommand_Quanhe(); ModifyCommand(); } catch { } }
private void cmdAdd_Click(object sender, EventArgs e) { if (grdList.RowCount <= 0) return; frm_ChonDoituongKCB frm = new frm_ChonDoituongKCB(); frm._enObjectType = enObjectType.DichvuCLS; frm.m_dtObjectDataSource = m_dtObjectTypeDetailService; frm.Original_Price = Utility.DecimaltoDbnull(grdList.CurrentRow.Cells[DmucDichvuclsChitiet.Columns.DonGia].Value, 0); frm.MaKhoaTHIEN = Utility.sDbnull(cboKhoaTH.SelectedValue, ""); frm.DetailService = Utility.Int32Dbnull(grdList.CurrentRow.Cells[DmucDichvuclsChitiet.Columns.IdChitietdichvu].Value, 0); frm.ShowDialog(); if (!frm.m_blnCancel) cmdSaveObjectAll_Click(cmdSaveObjectAll, e); ModifyCommand1(); ModifyCommand(); }