Ejemplo n.º 1
0
        public DyeingProcessCreelUnit SaveCreelUnit(DyeingProcessCreelUnit creelUnit)
        {
            var res = new DyeingProcessCreelUnit();
            var dt  = new DataTable();

            try
            {
                dt             = InserOrUpdateCreelUnit("SP_INSERT_DYEING_PROCESS_CREEL_UNIT", "SAVE_CREEL_UNIT", creelUnit);
                res.SaveStatus = Operation.Success.ToString();
                res.ID         = Convert.ToInt32(dt.Rows[0]["ID"].ToString());
            }
            catch (Exception ex)
            {
                res.SaveStatus = ex.Message;
            }
            return(res);
        }
Ejemplo n.º 2
0
        public JsonResult SaveCreelUnit(DyeingProcessCreelUnit creelUnit)
        {
            var user = (User)Session["CurrentUser"];

            if (creelUnit != null)
            {
                if (creelUnit.ID == 0)
                {
                    creelUnit.EntryBy   = user.USERID;
                    creelUnit.EntryDate = DateTime.Now;
                }
                else
                {
                    creelUnit.UpdateBy   = user.USERID;
                    creelUnit.UpdateDate = DateTime.Now;
                }
            }
            var res = _dyeingUtilityRepo.SaveCreelUnit(creelUnit);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 3
0
 public DataTable InserOrUpdateCreelUnit(string procedure, string callname, DyeingProcessCreelUnit creelUnit)
 {
     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("@ID", creelUnit.ID));
     cmd.Parameters.Add(new SqlParameter("@SetNo", creelUnit.SetNo));
     cmd.Parameters.Add(new SqlParameter("@LoadCellTension", creelUnit.LoadCellTension));
     cmd.Parameters.Add(new SqlParameter("@TakeOfForce", creelUnit.TakeOfForce));
     cmd.Parameters.Add(new SqlParameter("@Remark", creelUnit.Remark));
     cmd.Parameters.Add(new SqlParameter("@EntryBy", creelUnit.EntryBy));
     cmd.Parameters.Add(new SqlParameter("@EntryDate", creelUnit.EntryDate));
     cmd.Parameters.Add(new SqlParameter("@UpdateBy", creelUnit.UpdateBy));
     cmd.Parameters.Add(new SqlParameter("@UpdateDate", creelUnit.UpdateDate));
     da = new SqlDataAdapter(cmd);
     dt = new DataTable();
     da.Fill(dt);
     dbConn.Close();
     return(dt);
 }
Ejemplo n.º 4
0
 public DyeingProcessCreelUnit SaveCreelUnit(DyeingProcessCreelUnit creelUnit)
 {
     return(dataService.SaveCreelUnit(creelUnit));
 }