Esempio n. 1
0
        public ActionResult Create()
        {
            DesignationController designationController = new DesignationController();

            ViewBag.Designations = designationController.Designations();
            return(View());
        }
Esempio n. 2
0
        public ActionResult Edit(int Id)
        {
            try
            {
                employeeViewModel = new EmployeeViewModel();
                var employeeResult = webServices.Post(new EmployeeViewModel(), "AWFEmployee/Edit/" + Id);

                DesignationController designationController = new DesignationController();
                ViewBag.Designations = designationController.Designations();

                if (employeeResult.StatusCode == System.Net.HttpStatusCode.Accepted)
                {
                    if (employeeResult.Data != null)
                    {
                        employeeViewModel = (new JavaScriptSerializer().Deserialize <EmployeeViewModel>(employeeResult.Data.ToString()));
                    }
                }
                return(View(employeeViewModel));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }