void KeyDownEvent(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.F10: switch (e.Modifiers) { case Keys.None: if (((e.KeyCode == Keys.F10) && Common.CheckPermission(base.Object_ID, enuPermission_Type.Allow_New)) && Common.CheckPermission(base.Object_ID, enuPermission_Type.Allow_Edit)) { strError = string.Empty; OpenFileDialog ofdlg = new OpenFileDialog(); ofdlg.Filter = "xls files (*.xls;*.xlsx)|*.xls;*.xlsx"; ofdlg.RestoreDirectory = true; if (ofdlg.ShowDialog() != DialogResult.OK) { return; } dtImport = Common.ReadExcel(ofdlg.FileName); EpointProcessBox.Show(this); } return; case Keys.Control: //this.Export_Excel(); break; } break; } }
void btThanhtoan_Click(object sender, EventArgs e) { if (numTTien_Tt.Value == 0) { EpointMessage.MsgOk("Chưa chọn các chứng từ thanh toán"); return; } if (txtDien_Giai.Text == string.Empty) { EpointMessage.MsgOk("Nhập diễn giải cho chứng từ thanh toán"); return; } //DataTable dtTableSource = SQLExec.ExecuteReturnDt("SELECT *, CAST(0 AS BIT) AS Thanh_Toan FROM GLTHANHTOANCT WHERE 0 = 1"); foreach (DataRow row2 in this.dtCtHanTt.Select(this.bdsHanTt.Filter)) { if (!(bool)row2["Thanh_Toan"]) { continue; } if (Convert.ToDouble(row2["Tien_Tt1"]) <= 0) { EpointMessage.MsgOk("Tồn tại dòng thanh toán tiền âm!"); return; } } EpointProcessBox.Show(this); //Save_HanTt0_TaoPTTheoKH(); this.FillHanTt(); }
void tlResource_MouseClick(object sender, MouseEventArgs e) { //throw new NotImplementedException(); if (bdsResource.Position >= 0) { Common.CopyDataRow(((DataRowView)bdsResource.Current).Row, ref drCurrent); } string strColumnName = tlResource.FocusedColumn.Name; if (strColumnName == "DUYET") { if (drCurrent["ZaloLink"].ToString() != string.Empty) { frmDuyet frm = new frmDuyet(); frm.Load(drCurrent); if (frm.isAccept) { ReleaseType = "S"; MsgIDCur = Convert.ToInt32(drCurrent["Ident00"]); EpointProcessBox.Show(this); Common.CopyDataRow(drCurrent, ((DataRowView)bdsResource.Current).Row); ReleaseType = string.Empty; } } } }
void btOk_Click(object sender, EventArgs e) { EpointProcessBox.Show(this); //Common.CloseCurrentFormOnMain(); }
void btImport_Click(object sender, EventArgs e) { strError = string.Empty; dtImport = Common.ReadExcel(txtFile_Name.Text); Setdefault(ref dtImport); EpointProcessBox.Show(this); }
protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.F10) { ReleaseType = "G"; EpointProcessBox.Show(this); ReleaseType = string.Empty; } else { base.OnKeyDown(e); } }
void btThanhtoan_Click(object sender, EventArgs e) { if (numTSo_Luong.Value == 0) { EpointMessage.MsgOk("Chưa chọn các chứng từ thanh toán"); return; } if (txtDien_Giai.Text == string.Empty) { EpointMessage.MsgOk("Nhập diễn giải cho chứng từ thanh toán"); return; } //DataTable dtTableSource = SQLExec.ExecuteReturnDt("SELECT *, CAST(0 AS BIT) AS Thanh_Toan FROM GLTHANHTOANCT WHERE 0 = 1"); foreach (DataRow row2 in this.dtCtHanTt.Select(this.bdsHanTt.Filter)) { if (!(bool)row2["Thanh_Toan"]) { continue; } if (Convert.ToDouble(row2["SL_Thu_Hoi"]) <= 0) { EpointMessage.MsgOk("Tồn tại dòng thanh toán tiền âm!"); return; } } //DataTable dtEditCtDisc = new DataTable("VC_THUHOI"); //DataColumn dcMa_Dt = new DataColumn("Ma_Dt", typeof(string)); //dcMa_Dt.DefaultValue = ""; //dtEditCtDisc.Columns.Add(dcMa_Dt); //DataColumn dcMa_Vt = new DataColumn("Ma_Vt", typeof(string)); //dcMa_Vt.DefaultValue = ""; //dtEditCtDisc.Columns.Add(dcMa_Vt); //DataColumn dcSo_Luong = new DataColumn("So_Luong", typeof(double)); //dcSo_Luong.DefaultValue = 0; //dtEditCtDisc.Columns.Add(dcSo_Luong); EpointProcessBox.Show(this); this.FillCongNoVC(); }
void btImport_Click(object sender, EventArgs e) { strError = string.Empty; OpenFileDialog ofdlg = new OpenFileDialog(); ofdlg.Filter = "xls files (*.xls;*.xlsx)|*.xls;*.xlsx"; ofdlg.RestoreDirectory = true; if (ofdlg.ShowDialog() != DialogResult.OK) { return; } dtImport = Common.ReadExcel(ofdlg.FileName); EpointProcessBox.Show(this); }
void btImport_Click(object sender, EventArgs e) { strError = string.Empty; OpenFileDialog ofdlg = new OpenFileDialog(); ofdlg.Filter = "xls files (*.xls;*.xlsx)|*.xls;*.xlsx"; ofdlg.RestoreDirectory = true; if (ofdlg.ShowDialog() != DialogResult.OK) { return; } DataTable dtExcel = new DataTable(); dtImport = SQLExec.ExecuteReturnDt("DECLARE @KPICAMPAIGN AS TVP_KPICAMPAIGN SELECT * FROM @KPICAMPAIGN"); dtExcel = Common.ReadExcel(ofdlg.FileName); Setdefault(ref dtExcel); CopyDataToTable(ref dtImport, dtExcel); EpointProcessBox.Show(this); }
void btKet_Chuyen_Click(object sender, EventArgs e) { //KetChuyen frmKetChuyen_Run frm = new frmKetChuyen_Run(); frm.Tag = "Ket_Chuyen"; frm.numThang1.Value = Element.sysNgay_Ct1.Month; frm.numThang2.Value = Element.sysNgay_Ct2.Month; frm.Load(); if (!frm.isAccept) { return; } dteNgay_Ct1 = Library.StrToDate("01/" + frm.numThang1.Value + "/" + Element.sysWorkingYear); dteNgay_Ct2 = Library.StrToDate("01/" + frm.numThang2.Value + "/" + Element.sysWorkingYear); dteNgay_Ct2 = dteNgay_Ct2.AddMonths(1).AddDays(-1); iKetchuyen = true; EpointProcessBox.Show(this); }
void btThanhtoan_Click(object sender, EventArgs e) { EpointProcessBox.Show(this); }
void frmDmKetChuyen_View_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.A) { for (int i = 0; i < dtKetChuyen.Rows.Count; i++) { dtKetChuyen.Rows[i]["SELECT"] = true; } } else if (e.Control && e.KeyCode == Keys.U) { for (int i = 0; i < dtKetChuyen.Rows.Count; i++) { dtKetChuyen.Rows[i]["SELECT"] = false; } } else if (!e.Control && e.KeyCode == Keys.F10) { //KetChuyen frmKetChuyen_Run frm = new frmKetChuyen_Run(); frm.Tag = "Ket_Chuyen"; frm.numThang1.Value = Element.sysNgay_Ct1.Month; frm.numThang2.Value = Element.sysNgay_Ct2.Month; frm.Load(); if (!frm.isAccept) { return; } dteNgay_Ct1 = Library.StrToDate("01/" + frm.numThang1.Value + "/" + Element.sysWorkingYear); dteNgay_Ct2 = Library.StrToDate("01/" + frm.numThang2.Value + "/" + Element.sysWorkingYear); dteNgay_Ct2 = dteNgay_Ct2.AddMonths(1).AddDays(-1); iKetchuyen = true; EpointProcessBox.Show(this); } else if (e.Control && e.KeyCode == Keys.F10) { //KetChuyen_Delete(); frmKetChuyen_Run frm = new frmKetChuyen_Run(); frm.Tag = "Ket_Chuyen"; frm.numThang1.Value = Element.sysNgay_Ct1.Month; frm.numThang2.Value = Element.sysNgay_Ct2.Month; frm.Load(); if (!frm.isAccept) { return; } dteNgay_Ct1 = Library.StrToDate("01/" + frm.numThang1.Value + "/" + Element.sysWorkingYear); dteNgay_Ct2 = Library.StrToDate("01/" + frm.numThang2.Value + "/" + Element.sysWorkingYear); dteNgay_Ct2 = dteNgay_Ct2.AddMonths(1).AddDays(-1); iKetchuyen = false; EpointProcessBox.Show(this); } else if (e.KeyCode == Keys.Space) { ((DataRowView)bdsKetChuyen.Current).Row["Select"] = !(bool)((DataRowView)bdsKetChuyen.Current).Row["Select"]; } }
void btnSendMail_Click(object sender, EventArgs e) { EpointProcessBox.Show(this); }
void btCalcSalary_Click(object sender, EventArgs e) { EpointProcessBox.Show(this); }
void btnSendMail_Click(object sender, EventArgs e) { OptionProcess = "EMAIL"; EpointProcessBox.Show(this); }
void btCalcSalary_Click(object sender, EventArgs e) { this.OptionProcess = "CALSALARY"; EpointProcessBox.Show(this); }