Esempio n. 1
0
        public ActionResult AddorUpdate(UserModel model, HttpPostedFileBase theFile)
        {
            _userService.AddOrUpdate(model, theFile);
              //  var userlistModel = _userService.GetAllUsers();
               // return PartialView("Controls/User/_UserList", userlistModel);

            var userlistModel = _userService.GetAllUsersBySp().ToList();
            // var userlistModel=  _userService.GetAllUsers().ToList();
            return PartialView("Controls/User/_UserList", userlistModel);
        }
Esempio n. 2
0
        public ActionResult Update(UserModel model, HttpPostedFileBase theFile)
        {
            _userService.ClientStaffUpdate(model, theFile);

            var currentUser = UserManager.Current();
            var profile = new UserProfileModel();
            if (currentUser != null)
            {
               //profile profile = _userService.UserProfile(currentUser.Row_Id);
            }
            return PartialView("Controls/Client/_UserProfile", profile);
        }
Esempio n. 3
0
        public ActionResult EditProfile(string userid)
        {
            var model = new UserModel();

            if (!string.IsNullOrEmpty(userid))
            {

                model = _userService.GetUserByid(int.Parse(userid));
            }

            return PartialView("Controls/Staff/_UpdateUser", model);
        }
Esempio n. 4
0
        public ActionResult NewUser(string userid)
        {
            var model = new UserModel();
            var currentUser = UserManager.Current();
            if (currentUser != null)
            {
                if (!string.IsNullOrEmpty(userid))
                {
                    model = _userService.GetUserByid(int.Parse(userid));
                }
                var companylst = _repository.SelectAll().Where(c => c.Org_Id == currentUser.OrgId);

                model.ProductGrouplist = _productGroupRepository.GetProductgroupBySp(currentUser.OrgId,null).ToList();
                model.Companylist = companylst.OrderBy(m=>m.XeroName).ToList();
                var userTypelist = _userService.GetUserTypes();
                if (userTypelist.Count > 0)
                {
                    model.UserTypelist = userTypelist.ToList();
                }
                model.Calendarlist = _userService.GetAllCalendars(int.Parse(currentUser.OrgId.ToString())).ToList();
                model.Colorlist = _repositoryschedule.GetAllColors();
            }
            if (!string.IsNullOrEmpty(userid))
            {
                return PartialView("Controls/User/_UpdateUser", model);
            }
            else
            {
                model.IsActive = true;
                  return PartialView("Controls/User/_CreateUser", model);
            }
        }
Esempio n. 5
0
        public ActionResult Update(UserModel model, HttpPostedFileBase theFile)
        {
            _userService.ClientStaffUpdate(model, theFile);

            var currentUser = UserManager.Current();
            var profile = new UserProfileModel();
            if (currentUser != null)
            {
                DateTime dt = DateTime.Now;

                // User Prodile Model insteed of UserprofileModel
             //   profile = _userService.UserProfile(currentUser.Row_Id);
                profile.OrderTracking = _userService.JobEventTrackings(currentUser.Row_Id).Where(m => m.Created.Date <= dt.Date && m.Created > dt.AddDays(-7)).ToList();
            }
            return PartialView("Controls/Staff/_StaffProfile", profile);
        }