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 tsbAdd_Click(object sender, EventArgs e) { try { if (order.IsEdit() == true) { var res = System.Windows.Forms.MessageBox.Show("数据已修改,是否保存?", "提示", MessageBoxButtons.YesNoCancel); 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) { System.Windows.Forms.MessageBox.Show(ex.Message); } }
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("frmIOMaster->tsbAdd_Click()", ex.ToString()); } }