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.ICusPriceOrder bll = new BLL.CusPriceOrderBLL(); 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.ICusPriceOrder bll = new BLL.CusPriceOrderBLL(); 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) { try { if (txtsheet_no.Text.Trim() != "") { string sheet_no = txtsheet_no.Text.Trim(); if (System.Windows.Forms.MessageBox.Show("确认删除单据" + sheet_no + "?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes) { IBLL.ICusPriceOrder bll = new BLL.CusPriceOrderBLL(); bll.Delete(sheet_no); IOrder ins = this; ins.Add(); } } } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
private void tsbDel_Click(object sender, EventArgs e) { try { if (this.dataGrid1.CurrentRow() != null) { string sheet_no = this.dataGrid1.CurrentRow()["sheet_no"].ToString(); if (System.Windows.Forms.MessageBox.Show("确认删除单据" + sheet_no + "?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes) { IBLL.ICusPriceOrder bll = new BLL.CusPriceOrderBLL(); bll.Delete(sheet_no); var tb = this.dataGrid1.DataSource; tb.Rows.Remove(this.dataGrid1.CurrentRow()); this.dataGrid1.Refresh(); } } } catch (Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } }