// GET: EmployeeDashboard
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            using (var clientContext = spContext.CreateUserClientContextForSPHost())
            {
                empBasicinfo = emp.GetAllEmployee(clientContext);
            }
            ViewBag.EmpList = empBasicinfo;
            return(View());
        }
 public ActionResult Index()
 {
     try
     {
         var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);
         using (var clientContext = spContext.CreateUserClientContextForSPHost())
         {
             ViewBag.ProjectTypeData = emp.GetAllEmployee(clientContext);
         }
     }
     catch (Exception ex)
     {
         throw new Exception(string.Format("An error occured while performing action. GUID: {0}", ex.ToString()));
     }
     return(View());
 }
        // GET: EmployeeNew
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            using (var clientContext = spContext.CreateUserClientContextForSPHost())
            {
                ViewBag.company     = company.GetAllCompany(clientContext);
                ViewBag.designation = designation.GetDesignation(clientContext);
                ViewBag.department  = department.GetAllDepartment(clientContext);
                ViewBag.division    = division.GetDivision(clientContext);
                ViewBag.Branch      = Branch.GetBranch(clientContext);
                ViewBag.Region      = Region.GetRegion(clientContext);
                ViewBag.username    = username.Getusergroup(clientContext);
                ViewBag.emp         = emp.GetAllEmployee(clientContext);
            }
            return(View());
        }