Esempio n. 1
0
        public ActionResult UpdateUser()
        {
            UserModel      model       = new UserModel();
            CmnEntityModel currentUser = Session["CmnEntityModel"] as CmnEntityModel;

            if (currentUser == null)
            {
                return(RedirectToAction("Login", "Login"));
            }

            //CommonService comService = new CommonService();
            UserDa dataAccess = new UserDa();

            if (currentUser.ID > 0)
            {
                UserModel infor = new UserModel();
                infor = dataAccess.getInfoUser(currentUser.ID);

                model = infor != null ? infor : model;
            }
            int HaNoiCity = 1;
            ManageDistrictDa daDistrict = new ManageDistrictDa();

            model.DISTRICT_LIST = daDistrict.getDistrictList(HaNoiCity).ToList().Select(
                f => new SelectListItem
            {
                Value = f.ID.ToString(),
                Text  = f.Name
            }).ToList();
            model.DISTRICT_LIST.Insert(0, new SelectListItem {
                Value = Constant.DEFAULT_VALUE, Text = "Chọn Quận/huyện"
            });

            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Register(long UserId = 0)
        {
            UserModel model = new UserModel();

            //CommonService comService = new CommonService();
            UserDa dataAccess = new UserDa();

            if (UserId > 0)
            {
                UserModel infor = new UserModel();
                infor = dataAccess.getInfoUser(UserId);

                model = infor != null ? infor : model;
            }

            return(View(model));
        }
Esempio n. 3
0
        public ActionResult ChangePassword()
        {
            CmnEntityModel currentUser = Session["CmnEntityModel"] as CmnEntityModel;

            if (currentUser == null)
            {
                return(RedirectToAction("Login", "Login"));
            }
            UserModel model = new UserModel();

            UserDa dataAccess = new UserDa();

            if (currentUser.ID > 0)
            {
                UserModel infor = new UserModel();
                infor = dataAccess.getInfoUser(currentUser.ID);

                model = infor != null ? infor : model;
            }

            return(View(model));
        }