protected void onClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e) { switch (toolBarStandar.Buttons.IndexOf(e.Button)) { case 4: //DetalleCtaCte mz.erp.ui.utility.Util.MoveFocus(ultraExplorerBarContainerControl1); MostrarDetalleCuentaCorriente(); break; case 2: //Execute mz.erp.ui.utility.Util.MoveFocus(ultraExplorerBarContainerControl1); gridEX1.UpdateData(); _uiController.Execute(); break; case 8: //Ver cta.cte. Detalles_Click(this, new EventArgs()); break; default: break; } }
/// <summary> /// hàm thực hiện việc thêm phiếu nhập kho thuốc /// </summary> private void ThemPhieuXuatKho() { TPhieutrathuocKholeVekhochan objPhieuNhap = CreatePhieuNhapKho(); ActionResult actionResult = new PhieuTraLai().ThemPhieuTraLaiKho (objPhieuNhap, CreateArrPhieuChiTiet()); switch (actionResult) { case ActionResult.Success: txtIDPhieuNhapKho.Text = Utility.sDbnull(objPhieuNhap.IdPhieu); txtMaPhieu.Text = Utility.sDbnull(objPhieuNhap.MaPhieu); TPhieutrathuocKholeVekhochan objDPhieuNhap = TPhieutrathuocKholeVekhochan.FetchByID(Utility.Int32Dbnull(txtIDPhieuNhapKho.Text)); DataRow newDr = p_dtPhieuNhapTra.NewRow(); Utility.FromObjectToDatarow(objDPhieuNhap, ref newDr); TDmucKho objKho = TDmucKho.FetchByID(Utility.Int32Dbnull(cboKhoLinh.SelectedValue, -1)); if (objKho != null) { newDr["ten_khonhap"] = Utility.sDbnull(objKho.TenKho); } objKho = TDmucKho.FetchByID(Utility.Int32Dbnull(cboKhoTra.SelectedValue, -1)); if (objKho != null) { newDr["ten_khoxuat"] = Utility.sDbnull(objKho.TenKho); } DmucNhanvien objStaff = DmucNhanvien.FetchByID(Utility.Int32Dbnull(cboNhanVien.SelectedValue)); if (objStaff != null) { newDr["ten_nhanvien"] = Utility.sDbnull(objStaff.TenNhanvien); } p_dtPhieuNhapTra.Rows.Add(newDr); grdList.UpdateData(); //Utility.ShowMsg("Bạn thêm mới phiếu thành công", "Thông báo"); Utility.GonewRowJanus(grdList, TPhieutrathuocKholeVekhochan.Columns.IdPhieu, Utility.sDbnull(txtIDPhieuNhapKho.Text)); em_Action = action.Insert; b_Cancel = true; this.Close(); break; case ActionResult.Error: Utility.ShowMsg("Lỗi trong quá trình thêm phiếu", "Thông báo lỗi", MessageBoxIcon.Error); break; } }
public void KeyDownNext() { gridEXDetalle.UpdateData(); _uiController.Execute(); }