コード例 #1
0
        public ActionResult AddNewAdmin()
        {
            int cid = Convert.ToInt32(Session["Cid"]);

            ViewBag.Designation1 = DropDownHandler.Designation(cid);
            return(View());
        }
コード例 #2
0
        public ActionResult AddNewStaff(int id = 0)
        {
            if (id > 0)
            {
                var data = db.Users.Where(m => m.id == id).FirstOrDefault();
                StaffHandler.Update(data.id, data);
                TempData["deactive"] = "User Succesfully DeActivated";
                return(RedirectToAction("StaffList"));
            }
            else
            {
                int cid = Convert.ToInt32(Session["BranchCompanyid"]);
                ViewBag.Dept        = DropDownHandler.Dept(cid);
                ViewBag.Designation = DropDownHandler.Designation(cid);


                return(View());
            }
        }