| | |
| | | ApiAction response = new(); |
| | | try |
| | | { |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { ROT_ID = rotId, PROD_CODE = prodCode }); |
| | | Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("SP_MES_ROUTE2PROD", pars); ; |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { ROT_ID = rotId, PROD_CODE = prodCode, ERR_CODE = 0, ERR_MSG = "" }); |
| | | pars[2].Direction = System.Data.ParameterDirection.Output; |
| | | pars[3].Direction = System.Data.ParameterDirection.Output; |
| | | Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("SP_MES_ROUTE2PROD", pars); |
| | | response.Data = pars[3].Value; |
| | | response.Message = pars[4].Value.ToString(); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | |
| | | ApiAction response = new(); |
| | | try |
| | | { |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { ROT_ID = rotId, PROD_CODE = prodCode, CUST_CODE = custCode }); |
| | | Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("SP_MES_ROUTE2CUST", pars); ; |
| | | SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { ROT_ID = rotId, PROD_CODE = prodCode, CUST_CODE = custCode, ERR_CODE=0, ERR_MSG="" }); |
| | | pars[3].Direction = System.Data.ParameterDirection.Output; |
| | | pars[4].Direction = System.Data.ParameterDirection.Output; |
| | | Biz.Db.Ado.UseStoredProcedure().ExecuteCommand("SP_MES_ROUTE2CUST", pars); |
| | | response.Data = pars[3].Value; |
| | | response.Message = pars[4].Value.ToString(); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |