| | |
| | | string _intSum = ""; |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | using (var cmd =new SqlCommand("[prc_sys_role_set_menuOrAction]", conn)) |
| | | using (var cmd =new SqlCommand("[prc_pda_SCLL]", conn)) |
| | | { |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | //prC_pda_SCLL_CF |
| | | public ProductionPickDto ScanCodeCF(WarehouseQuery query) |
| | | { |
| | | string _strMsg = ""; |
| | | string _intSum = ""; |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | using (var cmd =new SqlCommand("[prc_pda_SCLL_CF]", conn)) |
| | | { |
| | | try |
| | | { |
| | | conn.Open(); |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@outMsg", SqlDbType.NVarChar, 300), |
| | | new("@outSum", SqlDbType.NVarChar, 300), |
| | | new("@c_User", query.userName), |
| | | new("@p_biLL_no", query.daa001), |
| | | new("@p_item_barcode", query.barcode), |
| | | new("@num", query.num), |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | | foreach (var parameter in parameters) |
| | | cmd.Parameters.Add(parameter); |
| | | cmd.ExecuteNonQuery(); |
| | | _strMsg = parameters[0].Value.ToString(); |
| | | _intSum = parameters[1].Value.ToString(); |
| | | |
| | | |
| | | var result = Convert.ToInt32(_intSum); |
| | | if (result <= 0) |
| | | { |
| | | throw new Exception(_strMsg); |
| | | } |
| | | |
| | | var dto = new ProductionPickDto |
| | | { |
| | | daa001 = query.daa001, |
| | | barcode = query.barcode |
| | | }; |
| | | |
| | | return dto; |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | conn.Close(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private ProductionPickDto getDaa001(WarehouseQuery query) |
| | | { |
| | | if (string.IsNullOrEmpty(query.daa001)) throw new Exception("工单号为空"); |