public int PostOrderDetailsTmp(OrderDetailsTmpVm model) { try { string connection = Constants.Connection; int i = 0; using (SqlConnection sqlConn = new SqlConnection(connection)) { if (sqlConn.State == 0) { sqlConn.Open(); } using (SqlCommand sqlComm = new SqlCommand("USP_INS_SALES_ORDER_TMP", sqlConn)) { sqlComm.CommandType = System.Data.CommandType.StoredProcedure; sqlComm.Parameters.AddWithValue("@Article", model.Article); sqlComm.Parameters.AddWithValue("@Size", model.Size); sqlComm.Parameters.AddWithValue("@Qty", model.Qty); sqlComm.Parameters.AddWithValue("@DiscPrcnt", model.DiscPrcnt); sqlComm.Parameters.AddWithValue("@Created_By", model.Created_By); sqlComm.Parameters.AddWithValue("@CustomerID", model.CustomerID); i = sqlComm.ExecuteNonQuery(); sqlConn.Close(); return(i); } } } catch (Exception ex) { throw ex; } }
public int PostOrderDetailsTmp(OrderDetailsTmpVm model) { var result = _unitOfWork.PostOrderDetailSTemp.PostOrderDetailsTmp(model); return(result); }
public IActionResult PostOrderDetails(OrderDetailsTmpVm model) { var res = _orderDetailsTempManager.PostOrderDetailsTmp(model); return(Ok(res)); }