private void tsbDel_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; // DataRow dr = this.dgvBank.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IBank bll = new BLL.BankBLL(); var bank = DB.ReflectionHelper.DataRowToModel <bi_t_bank_info>(dr); bll.Del(bank); LoadBank(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } finally { System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; } }
private void tsbDel_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (txtsheet_no.Text.Trim() != "") { string sheet_no = txtsheet_no.Text.Trim(); if (YesNoForm.ShowFrom("确认删除单据" + sheet_no + "?") == DialogResult.Yes) { IBLL.ICashOrder bll = new BLL.CashOrder(); bll.Delete(sheet_no); IOrder ins = this; ins.Add(); } } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void tsbDel_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (this.dataGrid1.CurrentRow() != null) { string sheet_no = this.dataGrid1.CurrentRow()["sheet_no"].ToString(); if (YesNoForm.ShowFrom("确认删除单据" + sheet_no + "?") == DialogResult.Yes) { IBLL.IInOutBLL bll = new BLL.InOutBLL(); bll.DeleteInOut(sheet_no, update_time); var tb = this.dataGrid1.DataSource; tb.Rows.Remove(this.dataGrid1.CurrentRow()); this.dataGrid2.DataSource = new DataTable(); this.dataGrid1.Refresh(); } } } catch (Exception ex) { MsgForm.ShowFrom(ex); Helper.LogHelper.writeLog("frmIOMaster->tsbDel_Click()", ex.ToString()); } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } DataRow dr = this.dgvPay.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IPayment bll = new BLL.PaymentBLL(); var item = DB.ReflectionHelper.DataRowToModel <bi_t_payment_info>(dr); if (item.pay_flag.Equals("1")) { MsgForm.ShowFrom("系统预留方式不可删除"); return; } bll.Del(item); LoadPay(); } }
private void btnLogout_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } if (this.dgv.SelectedRows.Count < 1) { return; } if (YesNoForm.ShowFrom("确认要注销机号吗?") == DialogResult.Yes) { Model.netsetup ns = new Model.netsetup() { jh = dgv.CurrentRow.Cells["机号"].Value.ToString(), ip = dgv.CurrentRow.Cells["Ip地址"].Value.ToString(), softpos = dgv.CurrentRow.Cells["机号类型"].Value.ToString(), }; bll.DelJH(ns); LoadDGV(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void btnDel_Click(object sender, EventArgs e) { try { if (this.dataGrid1.CurrentRow() == null) { return; } if ("1".Equals(this.dataGrid1.CurrentRow()["is_base"].ToString())) { MsgForm.ShowFrom("系统样式不可删除"); return; } if (YesNoForm.ShowFrom("确认要删除样式[" + this.dataGrid1.CurrentRow()["style_name"] + "]") == DialogResult.Yes) { IBLL.IPrint bll = new BLL.PrintBLL(); PrintHelper.DelStyle(this.dataGrid1.CurrentRow()["style_id"].ToString()); bll.Del(new sys_t_print_style() { style_id = this.dataGrid1.CurrentRow()["style_id"].ToString(), update_time = DateTime.Now }); Flush(); } } catch (Exception exception) { MsgForm.ShowFrom(exception); } }
private void tsbDel_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (this.dataGrid1.CurrentRow() != null) { string sheet_no = this.dataGrid1.CurrentRow()["sheet_no"].ToString(); if (YesNoForm.ShowFrom("确认删除单据" + sheet_no + "?") == DialogResult.Yes) { IBLL.ICusSettle bll = new BLL.CusSettle(); bll.Delete(sheet_no); var tb = this.dataGrid1.DataSource; tb.Rows.Remove(this.dataGrid1.CurrentRow()); this.dataGrid2.DataSource = new DataTable(); this.dataGrid1.Refresh(); } } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } DataRow dr = this.dgvPay.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IFinanceBLL bll = new BLL.FinanceBLL(); var item = DB.ReflectionHelper.DataRowToModel <bi_t_sz_type>(dr); if (item != null) { try { bll.DeleteSZType(item.pay_way); init_data(); } catch (Exception ex) { MsgForm.ShowFrom("删除收支类型异常[" + ex.Message + "]"); } } } }
private void tsbDel_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } DataRow dr = this.dgvItem.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IItem bll = new BLL.ItemBLL(); var item = DB.ReflectionHelper.DataRowToModel <bi_t_item_info>(dr); bll.Del(item); LoadItem(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void tsbDel_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (tvRegion.SelectedNode != null) { if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IDept bll = new BLL.DeptBLL(); bll.Del(tvRegion.SelectedNode.Tag as bi_t_dept_info); tvRegion.SelectedNode.Remove(); } } } catch (Exception ex) { LogHelper.writeLog("frmDept=>Del", ex.ToString()); MsgForm.ShowFrom(ex); } }
private void tsbUpload_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } if (this.dgv.CurrentRow() != null) { if (order.IsEdit() == true) { var res = YesNoForm.ShowFrom("数据已修改,是否保存?"); if (res == DialogResult.Yes) { order.Save(); order.ShowOrder(this.dgv.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } else if (res == DialogResult.No) { order.ShowOrder(this.dgv.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } else if (res == DialogResult.Cancel) { } } else { order.ShowOrder(this.dgv.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } } }
private void tsbDel_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (this.dgv.CurrentRow() != null) { string sheet_no = this.dgv.CurrentRow()["sheet_no"].ToString(); if (YesNoForm.ShowFrom("确认删除单据" + sheet_no + "?") == DialogResult.Yes) { IBLL.ICheckBLL bll = new BLL.CheckBLL(); bll.DeleteChectInitSheet(new Model.ic_t_check_init() { sheet_no = sheet_no, update_time = DateTime.Now }); var tb = this.dgv.DataSource; tb.Rows.Remove(this.dgv.CurrentRow()); this.dgv.Refresh(); } } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } DataRow dr = this.dgvSup.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { if (_runType == 0) { IBLL.ISup bll = new BLL.SupBLL(); var sup = DB.ReflectionHelper.DataRowToModel <bi_t_supcust_info>(dr); bll.Del(sup); } else if (_runType == 1) { IBLL.ICus bll = new BLL.CusBLL(); var sup = DB.ReflectionHelper.DataRowToModel <bi_t_supcust_info>(dr); bll.Del(sup); } LoadSup(); } }
private void tsbDel_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (sheet_no != null && sheet_no != "") { if (YesNoForm.ShowFrom("确认删除单据[" + sheet_no + "]?") == System.Windows.Forms.DialogResult.Yes) { IBLL.IInOutBLL bll = new BLL.InOutBLL(); bll.DeleteInOut(sheet_no, update_time); IOrder ins = this; ins.Add(); } } } catch (Exception ex) { MsgForm.ShowFrom("删除单据异常[" + ex.Message + "]"); Helper.LogHelper.writeLog("frmOtherInOutSheet->tsbDel_Click()", ex.ToString(), sheet_no); } }
private void tsbInI_Click(object sender, EventArgs e) { //初始化 if (YesNoForm.ShowFrom("确认要初始化吗?") == DialogResult.Yes) { InI(); } }
protected override void Execute(CodeActivityContext context) { ActContext = context; form = new YesNoForm(); form.btnYes.Click += new EventHandler(ClickBtnYes); form.btnNo.Click += new EventHandler(ClickBtnNo); form.labelQuestion.Text = "Da li su odobrena dodatna istrazivanja?"; form.ShowDialog(); }
protected override void Execute(CodeActivityContext context) { ActContext = context; form = new YesNoForm(); form.btnYes.Click += new EventHandler(ClickBtnYes); form.btnNo.Click += new EventHandler(ClickBtnNo); form.labelQuestion.Text = "Da li je potrebno podneti zahtev za produzenje roka istrazivanja?"; form.ShowDialog(); }
protected override void Execute(CodeActivityContext context) { ActContext = context; form = new YesNoForm(); form.btnYes.Click += new EventHandler(ClickBtnYes); form.btnNo.Click += new EventHandler(ClickBtnNo); form.labelQuestion.Text = "Da li je izvestaj odobren od strane Univerziteta?"; form.ShowDialog(); }
protected override void Execute(CodeActivityContext context) { ActContext = context; form = new YesNoForm(); form.btnYes.Click += new EventHandler(ClickBtnYes); form.btnNo.Click += new EventHandler(ClickBtnNo); form.labelQuestion.Text = "Da li se odlaze odbrana?"; form.ShowDialog(); }
protected override void Execute(CodeActivityContext context) { ActContext = context; form = new YesNoForm(); form.btnYes.Click += new EventHandler(ClickBtnYes); form.btnNo.Click += new EventHandler(ClickBtnNo); form.labelQuestion.Text = "Da li je moguce ukloniti nedostatke?"; form.ShowDialog(); }
private void txt_voucher_no_TextChanged(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(this.txt_voucher_no.Text)) { return; } IBLL.IInOutBLL bll = new BLL.InOutBLL(); bll.GetInOut(this.txt_voucher_no.Text, "A", out in_master, out in_detail); if (in_detail.Rows.Count > 0) { var tb = editGrid1.DataSource; if (tb.Rows.Count > 0) { if (YesNoForm.ShowFrom("检测到表格中有数据,是否加载?(将覆盖数据)") == DialogResult.Yes) { tb.Clear(); } } foreach (DataRow dr in in_detail.Rows) { DataRow r = tb.NewRow(); r["item_no"] = dr["item_no"]; r["item_subno"] = dr["item_subno"]; r["item_name"] = dr["item_name"]; r["unit_no"] = dr["unit_no"]; r["item_size"] = dr["item_size"]; r["in_qty"] = dr["in_qty"]; r["valid_price"] = dr["valid_price"]; r["sub_amount"] = dr["sub_amount"]; r["other1"] = dr["other1"]; r["price"] = dr["price"]; tb.Rows.Add(r); } editGrid1.Refresh(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void txt_voucher_no_TextChanged(object sender, EventArgs e) { if (string.IsNullOrEmpty(txt_voucher_no.Text)) { return; } IBLL.IInOutBLL bll = new BLL.InOutBLL(); DataTable tb1; DataTable tb2; bll.GetSaleSheet(txt_voucher_no.Text, out tb1, out tb2); if (tb2.Rows.Count > 0) { var tb = editGrid1.DataSource; if (tb.Rows.Count > 0) { if (YesNoForm.ShowFrom("检测到表格中有数据,是否加载?(将覆盖数据)") == DialogResult.Yes) { tb.Clear(); } } foreach (DataRow dr in tb2.Rows) { DataRow r = tb.NewRow(); r["item_no"] = dr["item_no"]; r["item_subno"] = dr["item_subno"]; r["item_name"] = dr["item_name"]; r["unit_no"] = dr["unit_no"]; r["item_size"] = dr["item_size"]; r["in_qty"] = dr["sale_qnty"]; r["valid_price"] = dr["real_price"]; r["sub_amount"] = dr["sale_money"]; r["other1"] = dr["other1"]; r["price"] = dr["sale_price"]; tb.Rows.Add(r); } editGrid1.Refresh(); } }
private void tsbDel_Click(object sender, EventArgs e) { try { DataGridViewRow row = this.dgv.CurrentRow; if (row == null) { return; } if (YesNoForm.ShowFrom("确认要删除该行吗?") == DialogResult.Yes) { this.dgv.Rows.RemoveAt(row.Index); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void tsbEdit_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } if (this.dataGrid1.CurrentRow() != null) { if (order.IsEdit() == true) { var res = YesNoForm.ShowFrom("数据已修改,是否保存?"); if (res == DialogResult.Yes) { order.Save(); order.ShowOrder(this.dataGrid1.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } else if (res == DialogResult.No) { order.ShowOrder(this.dataGrid1.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } else if (res == DialogResult.Cancel) { } } else { order.ShowOrder(this.dataGrid1.CurrentRow()["sheet_no"].ToString()); ordermerge.ShowForm2(); } } } catch (Exception ex) { MsgForm.ShowFrom(ex); Helper.LogHelper.writeLog("frmIOMaster->tsbEdit_Click()", ex.ToString()); } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } DataRow dr = this.dgvPeo.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IPeople bll = new BLL.PeopleBLL(); var peo = DB.ReflectionHelper.DataRowToModel <bi_t_people_info>(dr); bll.Del(peo); LoadPeo(); } }
private void tsbDelType_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IOper bll = new BLL.OperBLL(); bll.DelOperType((sa_t_oper_type)this.tv.SelectedNode.Tag); LoadTv(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } DataRow dr = this.dgvOper.CurrentRow(); if (dr == null) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.IOper bll = new BLL.OperBLL(); var b = DB.ReflectionHelper.DataRowToModel <sa_t_operator_i>(dr); bll.Del(b.oper_id); tv_AfterSelect(null, null); } }
private void tsbAdd_Click(object sender, EventArgs e) { try { if (!MyLove.PermissionsBalidation(this.Text, "01")) { return; } if (order.IsEdit() == true) { var res = YesNoForm.ShowFrom("数据已修改,是否保存?"); if (res == DialogResult.Yes) { order.Save(); order.Add(); ordermerge.ShowForm2(); } else if (res == DialogResult.No) { order.Add(); ordermerge.ShowForm2(); } else if (res == DialogResult.Cancel) { } } else { order.Add(); ordermerge.ShowForm2(); } } catch (Exception ex) { MsgForm.ShowFrom(ex); Helper.LogHelper.writeLog("frmCGInSheetList->tsbAdd_Click()", ex.ToString()); } }
private void tsbIniPwd_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "14")) { return; } if (this.dgvOper.CurrentRow() == null) { return; } sa_t_operator_i oper = DB.ReflectionHelper.DataRowToModel <sa_t_operator_i>(dgvOper.CurrentRow()); if (YesNoForm.ShowFrom("确认要重置操作员:" + oper.oper_name + "的密码吗?") == DialogResult.Yes) { IBLL.IOper bll = new BLL.OperBLL(); bll.ResetPWD(oper.oper_id, "1234"); MsgForm.ShowFrom("重置完成,默认密码:1234"); LoadOper(); tv_AfterSelect(null, null); } }
private void tsbDel_Click(object sender, EventArgs e) { if (!MyLove.PermissionsBalidation(this.Text, "02")) { return; } if (string.IsNullOrEmpty(this.txtSheet_no.Text)) { return; } if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes) { IBLL.ICheckBLL bll = new BLL.CheckBLL(); bll.DeleteChectInitSheet(new ic_t_check_init() { sheet_no = this.txtSheet_no.Text, update_time = DateTime.Now }); IOrder order = this; order.Add(); } }