Esempio n. 1
0
        public OperationResult Update(UpdateAdmin_userModel model)
        {
            var entity = Admin_userList.First(t => t.Id == model.Id);

            entity.Id          = model.Id;
            entity.Name        = model.Name;
            entity.Userid      = model.Userid;
            entity.Passid      = model.Passid;
            entity.Usertype    = model.Usertype;
            entity.Fname       = model.Fname;
            entity.Lname       = model.Lname;
            entity.Mname       = model.Mname;
            entity.Gender      = model.Gender;
            entity.Title       = model.Title;
            entity.Email       = model.Email;
            entity.Description = model.Description;
            entity.Status      = model.Status;
            entity.Sessionid   = model.Sessionid;
            entity.Ip          = model.Ip;
            entity.Lastdate    = model.Lastdate;
            entity.Cretuser    = model.Cretuser;
            entity.Cretdate    = model.Cretdate;
            entity.Modidate    = model.Modidate;
            entity.Modiuser    = model.Modiuser;
            entity.Row_id      = model.Row_id;
            entity.Phoneid     = model.Phoneid;
            entity.Temp01      = model.Temp01;

            Admin_userRepository.Update(entity);
            return(new OperationResult(OperationResultType.Success, "update completed"));
        }
 public ActionResult Edit(UpdateAdmin_userModel model)
 {
     if (ModelState.IsValid)
     {
         this.UpdateBaseData <UpdateAdmin_userModel>(model);
         OperationResult result = Admin_userService.Update(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }
        public ActionResult Edit(string Id)
        {
            var model  = new UpdateAdmin_userModel();
            var entity = Admin_userService.Admin_userList.FirstOrDefault(t => t.Id == Id);

            if (null != entity)
            {
                model = new UpdateAdmin_userModel
                {
                    Id          = entity.Id,
                    Name        = entity.Name,
                    Userid      = entity.Userid,
                    Passid      = entity.Passid,
                    Usertype    = entity.Usertype,
                    Fname       = entity.Fname,
                    Lname       = entity.Lname,
                    Mname       = entity.Mname,
                    Gender      = entity.Gender,
                    Title       = entity.Title,
                    Email       = entity.Email,
                    Description = entity.Description,
                    Status      = entity.Status,
                    Sessionid   = entity.Sessionid,
                    Ip          = entity.Ip,
                    Lastdate    = entity.Lastdate,
                    Cretuser    = entity.Cretuser,
                    Cretdate    = entity.Cretdate,
                    Modidate    = entity.Modidate,
                    Modiuser    = entity.Modiuser,
                    Row_id      = entity.Row_id,
                    Phoneid     = entity.Phoneid,
                    Temp01      = entity.Temp01,
                };
            }
            return(PartialView(model));
        }