Example #1
0
        // GET: Admin/Params/Create
        public async Task <ActionResult> Create()
        {
            ViewBag.Title    = ModelName;
            ViewBag.SubTitle = "新建";
            ENG_LINEOPPARAMCONF eNG_LINEOPPARAMCONF = new ENG_LINEOPPARAMCONF();

            await InitSelect("");

            return(View(eNG_LINEOPPARAMCONF));
        }
Example #2
0
 // GET: Admin/Params
 public async Task <ActionResult> Index(ENG_LINEOPPARAMCONF Query)
 {
     ViewBag.Title    = ModelName;
     ViewBag.SubTitle = "查询";
     ViewBag.Query    = Query;
     return(View(await db.ENG_LINEOPPARAMCONF
                 .Where((e =>
                         (String.IsNullOrEmpty(Query.CONFNAME) || Query.CONFNAME.Equals(e.CONFNAME)) &&
                         PARAM_TYPE.Equals(e.PARAM_TYPE)))
                 .ToListAsync()));
 }
Example #3
0
        public async Task <ActionResult> DeleteConfirmed(string CONFNAME, decimal CONFID)
        {
            ViewBag.Title    = ModelName;
            ViewBag.SubTitle = "删除";

            ENG_LINEOPPARAMCONF eNG_LINEOPPARAMCONF = await db.ENG_LINEOPPARAMCONF.FindAsync(CONFNAME, CONFID);

            db.ENG_LINEOPPARAMCONF.Remove(eNG_LINEOPPARAMCONF);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Example #4
0
        // GET: Admin/Params/Delete/5
        public async Task <ActionResult> Delete(string CONFNAME, decimal CONFID)
        {
            ViewBag.Title    = ModelName;
            ViewBag.SubTitle = "删除";
            ENG_LINEOPPARAMCONF eNG_LINEOPPARAMCONF = await db.ENG_LINEOPPARAMCONF.FindAsync(CONFNAME, CONFID);

            if (eNG_LINEOPPARAMCONF == null)
            {
                return(HttpNotFound());
            }
            return(View(eNG_LINEOPPARAMCONF));
        }
Example #5
0
        // GET: Admin/Params/Details/5
        public async Task <ActionResult> Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ENG_LINEOPPARAMCONF eNG_LINEOPPARAMCONF = await db.ENG_LINEOPPARAMCONF.FindAsync(id);

            if (eNG_LINEOPPARAMCONF == null)
            {
                return(HttpNotFound());
            }
            return(View(eNG_LINEOPPARAMCONF));
        }
Example #6
0
        // GET: Admin/Params/Edit/5
        public async Task <ActionResult> Edit(string CONFNAME, decimal CONFID)
        {
            ViewBag.Title    = ModelName;
            ViewBag.SubTitle = "编辑";
            ENG_LINEOPPARAMCONF eNG_LINEOPPARAMCONF = await db.ENG_LINEOPPARAMCONF.FindAsync(CONFNAME, CONFID);

            if (eNG_LINEOPPARAMCONF == null)
            {
                return(HttpNotFound());
            }
            await InitSelect(eNG_LINEOPPARAMCONF.LINENAME, eNG_LINEOPPARAMCONF.L_OPNO, eNG_LINEOPPARAMCONF.L_STNO, eNG_LINEOPPARAMCONF.DATA_TYPE, eNG_LINEOPPARAMCONF.PARAM_TYPE);

            return(View(eNG_LINEOPPARAMCONF));
        }
Example #7
0
        public async Task <ActionResult> Edit([Bind(Include = "CONFNAME,CONFID,LINENAME,L_OPNO,L_STNO,PARAM_ID,PARAM_VAL,PARAM_UPPER,PARAM_LOWER,PARAM_TEXT,DATA_TYPE,COMMENTS")] ENG_LINEOPPARAMCONF eNG_LINEOPPARAMCONF)
        {
            ViewBag.Title    = ModelName;
            ViewBag.SubTitle = "编辑";
            Prepare(eNG_LINEOPPARAMCONF);
            if (ModelState.IsValid)
            {
                db.Entry(eNG_LINEOPPARAMCONF).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            await InitSelect(eNG_LINEOPPARAMCONF.LINENAME, eNG_LINEOPPARAMCONF.L_OPNO, eNG_LINEOPPARAMCONF.L_STNO, eNG_LINEOPPARAMCONF.DATA_TYPE, eNG_LINEOPPARAMCONF.PARAM_TYPE);

            return(View(eNG_LINEOPPARAMCONF));
        }
Example #8
0
 private ENG_LINEOPPARAMCONF Prepare(ENG_LINEOPPARAMCONF eNG_LINEOPPARAMCONF)
 {
     eNG_LINEOPPARAMCONF.PARAM_TYPE = PARAM_TYPE;
     if (String.IsNullOrEmpty(eNG_LINEOPPARAMCONF.LINENAME))
     {
         eNG_LINEOPPARAMCONF.LINENAME = "ALL";
     }
     if (String.IsNullOrEmpty(eNG_LINEOPPARAMCONF.L_OPNO))
     {
         eNG_LINEOPPARAMCONF.L_OPNO = "ALL";
     }
     if (String.IsNullOrEmpty(eNG_LINEOPPARAMCONF.L_STNO))
     {
         eNG_LINEOPPARAMCONF.L_STNO = "ALL";
     }
     return(eNG_LINEOPPARAMCONF);
 }
Example #9
0
        public async Task <ActionResult> Create([Bind(Include = "CONFNAME,CONFID,LINENAME,L_OPNO,L_STNO,PARAM_ID,PARAM_VAL,PARAM_UPPER,PARAM_LOWER,PARAM_TEXT,DATA_TYPE,COMMENTS")] ENG_LINEOPPARAMCONF eNG_LINEOPPARAMCONF)
        {
            ViewBag.Title    = ModelName;
            ViewBag.SubTitle = "新建";
            Prepare(eNG_LINEOPPARAMCONF);
            if (ModelState.IsValid)
            {
                decimal?confId = await db.ENG_LINEOPPARAMCONF.MaxAsync(p => p.CONFID);

                eNG_LINEOPPARAMCONF.CONFID = (confId.HasValue ? confId.Value + 1 : 1);
                db.ENG_LINEOPPARAMCONF.Add(eNG_LINEOPPARAMCONF);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            await InitSelect(eNG_LINEOPPARAMCONF.LINENAME);

            return(View(eNG_LINEOPPARAMCONF));
        }