Ejemplo n.º 1
0
        public ActionResult Edit(Guid id, Employer e)
        {
            try
            {
                // TODO: Add update logic here
                e.EmployerUpdate(id);

                return(RedirectToAction("Details"));
            }
            catch
            {
                return(View(e));
            }
        }
Ejemplo n.º 2
0
        public ActionResult Edit(Guid id, Employer e)
        {
            try
            {
                if (e.UploadedImageFile != null)
                {
                    using (MemoryStream ms = new MemoryStream())
                    {
                        e.UploadedImageFile.InputStream.CopyTo(ms);
                        e.ProfilePicture = ms.GetBuffer();
                        ms.Close();
                    }
                }

                e.EmployerUpdate(id);

                return(RedirectToAction("Details/" + id));
            }
            catch
            {
                return(View(e));
            }
        }