| | |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | if (unity.userName.IsNullOrEmpty()) throw new Exception("用户名不允许为空"); |
| | | if (unity.CfNum <= 0) throw new Exception("拆分数量需大于等于0"); |
| | | if (unity.sectionCode.IsNullOrEmpty()) throw new Exception("库位编号不允许为空"); |
| | | if (unity.barcode.IsNullOrEmpty()) throw new Exception("条码不允许为空"); |
| | | |
| | | using (var cmd = new SqlCommand("[prc_pda_bar_cf]", conn)) |
| | | using (var cmd = new SqlCommand("[prc_pda_inv_cprk]", conn)) |
| | | { |
| | | try |
| | | { |
| | |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@outMsg", SqlDbType.NVarChar, 300), |
| | | new("@outSum", SqlDbType.NVarChar, 300), |
| | | new("@barcode_new", SqlDbType.NVarChar, 300), |
| | | new("@c_user", unity.userName), |
| | | new("@p_old_barcode", unity.barcode), |
| | | new("@p_qty", unity.CfNum), |
| | | new("@po_outMsg", SqlDbType.NVarChar, 300), |
| | | new("@po_outSum", SqlDbType.NVarChar, 300), |
| | | new("@po_womInBarSum", SqlDbType.NVarChar, 300), |
| | | new("@pi_user", unity.userName), |
| | | new("@pi_barcode", unity.barcode), |
| | | new("@pi_sectionCode", unity.sectionCode), |
| | | |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |