Exemplo n.º 1
0
 /// <summary>
 /// 残损回退
 /// </summary>
 /// <param name="row"></param>
 /// <returns></returns>
 public void RollbackDamage(DataSet1.T_OCRX_DAMAGERow row)
 {
     row.ROLLBACK       = "Y";
     row.ROLLBACKREASON = row1.CTOSERRORMSG;
     row.UPDATEDBY      = Config.UserId;
     OCRX.DAL.cctdbDAL.UpdateDamageStatus(row);
 }
Exemplo n.º 2
0
        private void dgvDmgInfo_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dgvDmgInfo.Columns[e.ColumnIndex].Name == "Rollback")
            {
                try
                {
                    decimal dockid = decimal.Parse(dgvDmgInfo.Rows[e.RowIndex].Cells[1].Value.ToString());
                    DataSet1.T_OCRX_CNTDataTable dt = bll.SelectCnt(dockid);

                    row  = dt[0];
                    row2 = dt.Count > 1 ? dt[1] : null;


                    bll.row1 = row;
                    bll.row2 = row2;

                    this.Cursor = Cursors.WaitCursor;
                    if (row == null)
                    {
                        MessageBox.Show("该记录不存在");
                        return;
                    }

                    fmExcepInput fm = new fmExcepInput();
                    fm.reason = row.CTOSERRORMSG;

                    DialogResult drs = fm.ShowDialog();
                    //DialogResult drs = MessageBox.Show("确认转异常处理?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                    if (drs == DialogResult.No || drs == DialogResult.Cancel)
                    {
                        return;
                    }

                    row.CTOSERRORMSG = fm.reason;
                    if (row2 != null)
                    {
                        row2.CTOSERRORMSG = fm.reason;
                    }

                    bll.Rollback();

                    DataSet1.T_OCRX_DAMAGERow damageRow = damage[e.RowIndex];
                    bll.RollbackDamage(damageRow);

                    MessageBox.Show("回退成功.");

                    this.button1.PerformClick();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                finally
                {
                    this.Cursor = Cursors.Default;
                }
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 删除残损记录
 /// </summary>
 /// <param name="row"></param>
 public static void DeleteDamage(DataSet1.T_OCRX_DAMAGERow row)
 {
     SqlHelper.Oracle.ExecuteObjectTypedParams(Config.ConnectionString, "OCR.pkg_ocrx.p_delete_damage", CommandType.StoredProcedure, row);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 更新残损记录状态
 /// </summary>
 /// <param name="row"></param>
 public static void UpdateDamageStatus(DataSet1.T_OCRX_DAMAGERow row)
 {
     OCRDbContext.Runner.ExecuteObjectTypedParams(Config.ConnectionString, "OCR.pkg_ocrx.p_update_damagecntx", CommandType.StoredProcedure, row);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 插入残损记录
 /// </summary>
 /// <param name="row"></param>
 public static void InsertDamage(DataSet1.T_OCRX_DAMAGERow row)
 {
     OCRDbContext.Runner.ExecuteObjectTypedParams(Config.ConnectionString, "OCR.pkg_ocrx.p_insert_damage", CommandType.StoredProcedure, row);
 }
Exemplo n.º 6
0
 /// <summary>
 /// 删除单个箱残损信息
 /// </summary>
 /// <returns></returns>
 public void DeleteDamageInfo(DataSet1.T_OCRX_DAMAGERow row)
 {
     OCRX.DAL.cctdbDAL.DeleteDamage(row);
 }
Exemplo n.º 7
0
 /// <summary>
 /// 更新单个箱残损信息
 /// </summary>
 /// <returns></returns>
 public void UpdateDamageInfo(DataSet1.T_OCRX_DAMAGERow row)
 {
     OCRX.DAL.cctdbDAL.UpdateDamageInfo(row);
 }
Exemplo n.º 8
0
 /// <summary>
 /// 新增单个箱残损信息
 /// </summary>
 /// <returns></returns>
 public void InsertDamageInfo(DataSet1.T_OCRX_DAMAGERow row)
 {
     OCRX.DAL.cctdbDAL.InsertDamage(row);
 }