public string DashboardUnallocatedEmpList(string companyCode) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetHrUnallocatedEmpList(companyCode); return(JsonConvert.SerializeObject(data)); }
// GET: Configuration/DashboardHrfSectionJson public JsonResult DashboardHrfSectionJson(CompanyObj obj) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetMpSections(obj.CompanyCode, obj.DivisionCode, obj.UnitCode, obj.EmployeeType); return(Json(data, JsonRequestBehavior.AllowGet)); }
public string DashboardSubSectionUdOn(CompanyObj obj) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetMpUdOnSubSections(obj.CompanyCode, obj.DivisionCode, obj.UnitCode, obj.EmployeeType); return(JsonConvert.SerializeObject(data)); }
public JsonResult DashboardAllocatedEmpList(CompanyObj companyObj) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetHrAllocatedEmpList(companyObj); return(Json(data, JsonRequestBehavior.AllowGet)); }
public JsonResult DashboardHrfSubSectionJson(CompanyObj obj) { _aDashboardHandler = new DashboardHandler(); List <SubSection> data = _aDashboardHandler.GetHrSubSections(obj.CompanyId, obj.UnitId); return(Json(data, JsonRequestBehavior.AllowGet)); }
public JsonResult DashboardExcessEmpList(string companyCode) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetHrExcessEmpList(companyCode); return(Json(data, JsonRequestBehavior.AllowGet)); }
public string DashboardAllocatedEmpList(CompanyObj companyObj) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetHrAllocatedEmpList(companyObj); return(JsonConvert.SerializeObject(data)); }
// GET: Configuration/DashboardHRFJson public JsonResult DashboardHrfDepartmentJson(CompanyObj obj) { _aDashboardHandler = new DashboardHandler(); List <Department> data = _aDashboardHandler.GetHrDepartments(obj.CompanyId, obj.UnitId, obj.EmployeeType); return(Json(data, JsonRequestBehavior.AllowGet)); }
public static void ClassSetup(TestContext testContext) { _mockDashboardFactory = new Mock<IDashboardFactory>(); _mockDashboardBuilder = new Mock<IDashboardBuilder>(); _mockDashboardFactory.Setup(f => f.Create(It.IsAny<string>())).Returns(new AdminDashboard("Admin")); _dashboardHandler = new DashboardHandler(_mockDashboardFactory.Object, _mockDashboardBuilder.Object); }
// GET: Configuration/DashboardUnitJsonData public JsonResult DashboardUnitJsonData(BusinessInfo aInfo) { var userId = Session["UserId"].ToString(); if (true) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetMpUnits(userId, aInfo.EmployeeType); return(Json(data, JsonRequestBehavior.AllowGet)); } }
public ActionResult <Dashboard> Get(int id) { int accountId; if (AccountController.TryGetAccountId(Request, out accountId)) { return(Ok(DashboardHandler.Get(accountId, id))); } return(NotFound()); }
public ActionResult <IEnumerable <Dashboard> > Get() { int accountId; if (AccountController.TryGetAccountId(Request, out accountId)) { return(Ok(DashboardHandler.GetAll(accountId))); } return(NotFound()); }
public string DashboardDivision(BusinessInfo aInfo) { var userId = Session["UserId"].ToString(); if (true) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetMpDivisions(userId, aInfo.EmployeeType); return(JsonConvert.SerializeObject(data)); } }
public ActionResult Delete(int id) { int accountId; if (AccountController.TryGetAccountId(Request, out accountId)) { DashboardHandler.Delete(accountId, id); return(NoContent()); } return(NotFound()); }
public ActionResult <int> Post(Dashboard dashboard) { int accountId; if (AccountController.TryGetAccountId(Request, out accountId)) { dashboard.AccountId = accountId; return(Ok(DashboardHandler.Create(dashboard))); } return(NotFound()); }
public ActionResult Put(int id, Dashboard dashboard) { int accountId; if (AccountController.TryGetAccountId(Request, out accountId)) { dashboard.AccountId = accountId; DashboardHandler.Update(id, dashboard); return(NoContent()); } return(NotFound()); }
// GET: Dashboard/DashboardCompany public string DashboardCompany(BusinessInfo aInfo) { try { var userId = Session["UserId"].ToString(); if (true) { _aDashboardHandler = new DashboardHandler(); var data = _aDashboardHandler.GetMpCompanies(userId, aInfo.EmployeeType); return(JsonConvert.SerializeObject(data)); } } catch (Exception ex) { return(ex.Message); } }
// GET: Configuration/DashboardHRF public ActionResult DashboardHrf(string userCode) { try { _aDashboardHandler = new DashboardHandler(); var email = _aDashboardHandler.GetDecriptionUserCode(userCode); if (userCode != null && email == null) { return(RedirectToAction("Register", "Account")); } Session["UserId"] = email; return(View()); } catch (Exception ex) { return(RedirectToAction("Login", "Account")); } }
// GET: Configuration/DashboardCompanyJsonData public JsonResult DashboardCompanyJsonData(BusinessInfo aInfo) { DataTable data = null; try { var userId = Session["UserId"].ToString(); if (true) { _aDashboardHandler = new DashboardHandler(); data = _aDashboardHandler.GetMpCompanies(userId, aInfo.EmployeeType); return(Json(data, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { return(Json(data, JsonRequestBehavior.AllowGet)); } }