コード例 #1
0
ファイル: ClientController.cs プロジェクト: gitAakash/OMS
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public ActionResult UserProfile(UserProfileModel model, HttpPostedFileBase theFile)
        {
            _userService.AddOrUpdateAttachment(model, theFile);

            return View();
        }
コード例 #4
0
 public ActionResult UserProfile()
 {
     UserProfileModel model = new UserProfileModel();
     return PartialView("Controls/User/_UserProfile", model);
 }
コード例 #5
0
ファイル: StaffController.cs プロジェクト: gitAakash/OMS
        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);
        }
コード例 #6
0
ファイル: StaffController.cs プロジェクト: gitAakash/OMS
        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);
        }