Пример #1
0
        public DataTable Insert_Update_SetInfo(string procedure, string callname, SetInfoEntity objSet)
        {
            _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("@p_SetID", objSet.SetId));
            _cmd.Parameters.Add(new SqlParameter("@p_WarpDate", objSet.WarpDate));
            _cmd.Parameters.Add(new SqlParameter("@p_SetNo", objSet.SetNo));
            _cmd.Parameters.Add(new SqlParameter("@p_Length", objSet.Length));
            _cmd.Parameters.Add(new SqlParameter("@p_EndsPerBeam", objSet.EndsPerBeam));
            _cmd.Parameters.Add(new SqlParameter("@p_TotalBeam", objSet.TotalBeam));
            _cmd.Parameters.Add(new SqlParameter("@p_TotalEnds", objSet.TotalEnds));
            _cmd.Parameters.Add(new SqlParameter("@p_DrumPreasure", objSet.DrumPreasure));
            _cmd.Parameters.Add(new SqlParameter("@p_YarnTension", objSet.YarnTension));
            _cmd.Parameters.Add(new SqlParameter("@p_BeamCreel", objSet.BeamCreel));
            _cmd.Parameters.Add(new SqlParameter("@p_MachineNo", objSet.MachineNo));
            _cmd.Parameters.Add(new SqlParameter("@p_ProductionTypeCode", objSet.ProductionTypeCode));
            _cmd.Parameters.Add(new SqlParameter("@p_SetStatusCode", objSet.SetStatusCode));
            _cmd.Parameters.Add(new SqlParameter("@p_Remarks", objSet.Remarks));
            _cmd.Parameters.Add(new SqlParameter("@p_UserName", objSet.UserName));
            _cmd.Parameters.Add(new SqlParameter("@p_EditDate", objSet.EditDate));

            _da = new SqlDataAdapter(_cmd);
            _dt = new DataTable();
            _da.Fill(_dt);
            _dbConn.Close();
            return(_dt);
        }
Пример #2
0
        public ActionResult SaveSetInfo(SetInfoEntity setInfoEntity)
        {
            var user = (User)Session["CurrentUser"];

            setInfoEntity.UserName = user.EMPID;
            setInfoEntity.EditDate = DateTime.Now;

            var res = _setInfoRepository.SaveSetInfo(setInfoEntity);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        public string SaveSetInfo(SetInfoEntity objSet)
        {
            string rv = "";

            try
            {
                Insert_Update_SetInfo("sp_insert_setInfo", "save_SetInfo_data", objSet);
                rv = Operation.Success.ToString();
            }
            catch (Exception ex)
            {
                rv = ex.Message;
            }
            return(rv);
        }