Example #1
0
        public ActionResult AddPriority(string empId)
        {
            DataTable dtEmployee = EmployeeDetails.GetEmployees(empId);

            if (dtEmployee.Rows.Count == 0)
            {
                return(HttpNotFound());
            }
            EmployeePriority empPriority = new EmployeePriority();

            empPriority.EmployeeID   = empId;
            empPriority.EmployeeName = dtEmployee.Rows[0]["EMPNAME"].ToString();
            string maxPriority = EmployeeDetails.GetEmployeeMaxPriority(empId);

            empPriority.Priority = ((maxPriority == "") ? 1 : Convert.ToInt32(maxPriority) + 1).ToString();
            return(View(empPriority));
        }