Example #1
0
        public OperationResult Insert(Admin_userModel model)
        {
            var entity = new Admin_user
            {
                Id          = model.Id,
                Name        = model.Name,
                Userid      = model.Userid,
                Passid      = model.Passid,
                Usertype    = model.Usertype,
                Fname       = model.Fname,
                Lname       = model.Lname,
                Mname       = model.Mname,
                Gender      = model.Gender,
                Title       = model.Title,
                Email       = model.Email,
                Description = model.Description,
                Status      = model.Status,
                Sessionid   = model.Sessionid,
                Ip          = model.Ip,
                Lastdate    = model.Lastdate,
                Cretuser    = model.Cretuser,
                Cretdate    = model.Cretdate,
                Modidate    = model.Modidate,
                Modiuser    = model.Modiuser,
                Row_id      = model.Row_id,
                Phoneid     = model.Phoneid,
                Temp01      = model.Temp01,
            };

            Admin_userRepository.Insert(entity);
            return(new OperationResult(OperationResultType.Success, "Added successfully"));
        }
        public ActionResult Delete(string Id)
        {
            var model = new Admin_userModel {
                Id = Id
            };

            this.UpdateBaseData <Admin_userModel>(model);
            OperationResult result = Admin_userService.Delete(model.Id);

            return(Json(result));
        }
 public ActionResult Create(Admin_userModel model)
 {
     if (ModelState.IsValid)
     {
         this.CreateBaseData <Admin_userModel>(model);
         OperationResult result = Admin_userService.Insert(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }
        public ActionResult Index()
        {
            var model = new Admin_userModel();

            return(View(model));
        }
        public ActionResult Create()
        {
            var model = new Admin_userModel();

            return(PartialView(model));
        }