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.DeleteSaleSSSheet(sheet_no, update_time);
                 IOrder ins = this;
                 ins.Add();
             }
         }
     }
     catch (Exception ex)
     {
         MsgForm.ShowFrom("删除单据异常[" + ex.Message + "]");
         Helper.LogHelper.writeLog("frmSaleSheer->tsbDel_Click()", ex.ToString(), sheet_no);
     }
 }
Example #2
0
 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.DeleteSaleSSSheet(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("frmSaleSSSheetList->tsbDel_Click()", ex.ToString());
     }
 }