private void simpleButton1_Click(object sender, EventArgs e) { if (spinEdit1.Value > spinEdit2.Value) { return; } if (KhoaSo(Int32.Parse(spinEdit2.Value.ToString()))) { return; } CalPB cal; for (int i = int.Parse(spinEdit1.Value.ToString()); i <= spinEdit2.Value; i++) { try { cal = new CalPB(i, namLv); cal.calculate(); fbangPB f = new fbangPB(cal.dtCCDC); f.Text = this.Text + " tháng " + i.ToString(); f.ShowDialog(); } catch { } } }
public fbangPB(CalPB banggia) { InitializeComponent(); BangGia = banggia; _bangGia = banggia.dtCCDC; this.KeyUp += FbangPB_KeyUp; }
private void simpleButton2_Click(object sender, EventArgs e) { if (spinEdit1.Value > spinEdit2.Value) { return; } if (KhoaSo(Int32.Parse(spinEdit2.Value.ToString()))) { return; } CalPB cal; for (int i = int.Parse(spinEdit1.Value.ToString()); i <= spinEdit2.Value; i++) { try { cal = new CalPB(i, namLv); if (cal.deleteBt()) { string msg = "Đã xóa bút toán tháng " + i.ToString() + " thành công!"; if (Config.GetValue("Language").ToString() == "1") { msg = UIDictionary.Translate(msg); } XtraMessageBox.Show(msg); } else { string msg = "Có lỗi trong quá trình xóa bút toán!"; if (Config.GetValue("Language").ToString() == "1") { msg = UIDictionary.Translate(msg); } XtraMessageBox.Show(msg); } } catch { } } }
private void simpleButton2_Click(object sender, EventArgs e) { CalPB cal; for (int i = int.Parse(spinEdit1.Value.ToString()); i <= spinEdit2.Value; i++) { try { cal = new CalPB(i, namLv); if (cal.deleteBt()) { MessageBox.Show("Ok!"); } else { MessageBox.Show("Có lỗi"); } } catch { } } }
private void simpleButton1_Click(object sender, EventArgs e) { CDTData data = new DataSingle("dtCCDC", Config.GetValue("sysPackageID").ToString()); data.Condition = "soky=0"; data.GetData(); BindingSource bs = new BindingSource(); bs.DataSource = data.DsData.Tables[0]; if (data.DsData.Tables[0].Rows.Count > 0) { FrmSingle fs = new FrmSingle(data); fs.ShowDialog(); } if (spinEdit1.Value > spinEdit2.Value) { return; } CalPB cal; for (int i = int.Parse(spinEdit1.Value.ToString()); i <= spinEdit2.Value; i++) { try { cal = new CalPB(i, namLv); cal.calculate(); fbangPB f = new fbangPB(cal); f.Text = this.Text; f.ShowDialog(); } catch { } } }
public fbangPB(CalPB banggia) { InitializeComponent(); BangGia = banggia; _bangGia = banggia.dtCCDC; }