コード例 #1
0
        /// <summary>
        /// 修改
        /// </summary>
        public ActionResult ModifyCfg(string ID, string ScanSiteCode, string ScanAction, string ProdLineCode, string IssStk, string RctStk, string PartVersion, string PartNo)
        {
            try
            {
                MFG_ProduceStkCfg cfg = new MFG_ProduceStkCfg();
                cfg.ID           = Convert.ToInt32(string.IsNullOrEmpty(ID) ? "0" : ID);
                cfg.ScanSiteCode = ScanSiteCode;
                cfg.ScanAction   = ScanAction;
                cfg.ProdLineCode = ProdLineCode;
                cfg.IssStk       = IssStk;
                cfg.RctStk       = RctStk;
                cfg.PartVersion  = PartVersion;
                cfg.PartNo       = PartNo;

                op.UpdateCfg(cfg);
                return(Json(new { state = "success", message = "修改成功!" }));
            }
            catch (Exception ex)
            {
                return(Json(new { state = "error", message = ex.Message }));
            }
        }
コード例 #2
0
        /// <summary>
        /// 新增
        /// </summary>
        public ActionResult AddCfg(string ScanSiteCode, string ScanAction, string ProdLineCode, string IssStk, string RctStk, string PartVersion, string PartNo)
        {
            try
            {
                MFG_ProduceStkCfg cfg = new MFG_ProduceStkCfg();
                cfg.FactoryCode  = this.FactoryCode;
                cfg.ScanSiteCode = ScanSiteCode;
                cfg.ScanAction   = ScanAction;
                cfg.ProdLineCode = ProdLineCode;
                cfg.IssStk       = IssStk;
                cfg.RctStk       = RctStk;
                cfg.PartVersion  = PartVersion;
                cfg.PartNo       = PartNo;

                op.InsertCfg(cfg);
                return(Json(new { state = "success", message = "添加成功!" }));
            }
            catch (Exception ex)
            {
                return(Json(new { state = "error", message = ex.Message }));
            }
        }