public JsonResult SaveWarpingDetail(WarpingProdDetails prodDetails) { if (prodDetails != null) { prodDetails.WarpDate = DateTime.Now; prodDetails.TracDate = DateTime.Now; prodDetails.RowDate = DateTime.Now; } var res = warpLapperRepository.SaveWarpDetail(prodDetails); return(Json(res, JsonRequestBehavior.AllowGet)); }
public WarpingProdDetails SaveWarpDetail(WarpingProdDetails prodDetails) { var res = new WarpingProdDetails(); var dt = new DataTable(); try { dt = UpdateWarpDetail("SP_INSERT_WARPING_PRODUCTION_DETAIL", "SAVE_DETAIL", prodDetails); res.SaveStatus = Operation.Success.ToString(); res.Wdid = Convert.ToInt32(dt.Rows[0]["Wdid"].ToString()); } catch (Exception ex) { res.SaveStatus = ex.Message; } return(res); }
public DataTable UpdateWarpDetail(string procedure, string callname, WarpingProdDetails prodDetails) { dbConn = new SqlConnection(connectionString); dbConn.Open(); cmd = new SqlCommand(procedure, dbConn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@call_name", callname)); cmd.Parameters.Add(new SqlParameter("@Wdid", prodDetails.Wdid)); cmd.Parameters.Add(new SqlParameter("@WarpDate", prodDetails.WarpDate)); cmd.Parameters.Add(new SqlParameter("@ICode", prodDetails.ICode)); cmd.Parameters.Add(new SqlParameter("@FlangeNo", prodDetails.FlangeNo)); cmd.Parameters.Add(new SqlParameter("@FlangeLength", prodDetails.FlangeLength)); cmd.Parameters.Add(new SqlParameter("@Lapper", prodDetails.Lapper)); cmd.Parameters.Add(new SqlParameter("@OperatorCardNo", prodDetails.OperatorCardNo)); cmd.Parameters.Add(new SqlParameter("@CapCode", prodDetails.CapCode)); da = new SqlDataAdapter(cmd); dt = new DataTable(); da.Fill(dt); dbConn.Close(); return(dt); }
public WarpingProdDetails SaveWarpDetail(WarpingProdDetails prodDetails) { return(warpLapperDataService.SaveWarpDetail(prodDetails)); }