Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            _operator _operator = db._operator.Find(id);

            db._operator.Remove(_operator);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "op_code,op_name,op_pass,op_cardno,remark,creator,creatdt,deptno")] _operator _operator)
 {
     if (ModelState.IsValid)
     {
         db.Entry(_operator).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(_operator));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "op_code,op_name,op_pass,op_cardno,remark,creator,creatdt,deptno")] _operator _operator)
        {
            if (ModelState.IsValid)
            {
                db._operator.Add(_operator);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(_operator));
        }
Example #4
0
        // GET: _operator/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            _operator _operator = db._operator.Find(id);

            if (_operator == null)
            {
                return(HttpNotFound());
            }
            return(View(_operator));
        }
 set => SetProperty(ref _operator, value);
Example #6
0
 public OperatorPrincipal(_operator oper)
 {
     this._identity = new OperatorIdentity(oper);
 }
Example #7
0
 public OperatorIdentity(_operator oper)
 {
     this._operatorObj = oper;
     this._name        = oper.oper_name;
 }