Exemple #1
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);
        }
        public ActionResult UserProfile1(UserProfileModel model, HttpPostedFileBase theFile)
        {
            if (theFile != null && theFile.ContentLength > 0)
            {

                byte[] data;
                using (Stream inputStream = theFile.InputStream)
                {
                    MemoryStream memoryStream = inputStream as MemoryStream;
                    // MemoryStream memoryStream = new MemoryStream();
                    if (memoryStream == null)
                    {
                        memoryStream = new MemoryStream();
                        inputStream.CopyTo(memoryStream);
                    }
                    data = memoryStream.ToArray();
                }
            }

            if (theFile != null && theFile.ContentLength > 0)
            {
                var fileName = Path.GetFileName(theFile.FileName);
                var path = Path.Combine(Server.MapPath("~/App_Data/uploads"), fileName);
                theFile.SaveAs(path);
            }

            return PartialView("Controls/User/_UserProfile", model);
        }
        public ActionResult UserProfile(UserProfileModel model, HttpPostedFileBase theFile)
        {
            _userService.AddOrUpdateAttachment(model, theFile);

            return View();
        }
 public ActionResult UserProfile()
 {
     UserProfileModel model = new UserProfileModel();
     return PartialView("Controls/User/_UserProfile", model);
 }
Exemple #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);
        }
Exemple #6
0
        public ActionResult StaffProfile()
        {
            var currentUser = UserManager.Current();
            var profile = new UserProfileModel();
            if (currentUser != null)
            {
               // profile = _userService.UserProfile(currentUser.Row_Id);
                DateTime dt = DateTime.Now;
                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);
        }