public JsonResult AllDeliverables(DeliverableRequest deliverableRequest) { if (deliverableRequest.FromDate != null) { deliverableRequest.FromDate = Convert.ToDateTime(Convert.ToDateTime(deliverableRequest.FromDate).ToString("dd-MM-yyyy")); } if (deliverableRequest.ToDate != null) { deliverableRequest.ToDate = Convert.ToDateTime(Convert.ToDateTime(deliverableRequest.ToDate).ToString("dd-MM-yyyy")); } if (Request.Cookies["AUTH_PTEmail"] != null && Request.Cookies["AUTHADMIN"] != null && Request.Cookies["AUTHADMIN"].Value == "Admin") { deliverableRequest.LoginMailId = ""; } List <Deliverables> result = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <Deliverables> >(deliverableRequest, CABPTMethodConstants.ALLDELIVERABLES); for (int i = 0; i < result.Count; i++) { if (result[i].PlannedDuration == "1 Days" || result[i].PlannedDuration == "0 Days") { result[i].PlannedDuration = result[i].PlannedDuration.Replace("Days", "Day"); } if (result[i].ActualDuration == "1 Days" || result[i].ActualDuration == "0 Days") { result[i].ActualDuration = result[i].ActualDuration.Replace("Days", "Day"); } } return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); }
public JsonResult SaveCheckListMapping(CheckListMappingList checkListMapping) { string[] CheckListIDs = checkListMapping.CheckListIDS; for (int i = 0; i < CheckListIDs.Length; i++) { CheckListMapping checkListAccount = new CheckListMapping { UserID = HttpContext.User.Identity.Name, CheckListId = Convert.ToInt32(CheckListIDs[i]), ProjectId = Convert.ToInt32(checkListMapping.ProjectId.ToString()), StageId = Convert.ToInt32(checkListMapping.StageId.ToString()), RoleId = Convert.ToInt32(checkListMapping.RoleId.ToString()), CreatedBy = HttpContext.User.Identity.Name, CreatedDate = DateTime.Now, UpdatedDate = DateTime.Now, IsActive = true }; if (i == 0) { bool response_ = CABusinessProjectTrackingAPIClient.GetHttpResponse <bool>(checkListAccount, CABPTMethodConstants.UPDATECHECKLISTMAPPING); } bool response = CABusinessProjectTrackingAPIClient.GetHttpResponse <bool>(checkListAccount, CABPTMethodConstants.ADDCHECKLISTMAPPING); string result = JsonConvert.SerializeObject(""); } return(Json("", JsonRequestBehavior.AllowGet)); }
public JsonResult SaveCheckListAccount(CheckListAccountLink checkListAccountLink) { string[] CheckListIDs = checkListAccountLink.CheckListIDS; for (int i = 0; i < CheckListIDs.Length; i++) { Console.WriteLine(CheckListIDs[i]); CheckListAccount checkListAccount = new CheckListAccount { UserID = HttpContext.User.Identity.Name, CheckListID = Convert.ToInt32(CheckListIDs[i].ToString()), DeliverableID = Convert.ToInt32(checkListAccountLink.DeliverableID.ToString()), DeliverableDetailID = Convert.ToInt32(checkListAccountLink.DeliverableDetailID.ToString()), ProjectID = Convert.ToInt32(checkListAccountLink.ProjectID.ToString()), StageID = Convert.ToInt32(checkListAccountLink.Stage.ToString()), StatusID = Convert.ToInt32(checkListAccountLink.State.ToString()), ResourceEmail = checkListAccountLink.ResourceName, Notes = "", }; bool response = CABusinessProjectTrackingAPIClient.GetHttpResponse <bool>(checkListAccount, CABPTMethodConstants.ADDNEWCHECKLISTACOUNTLINK); string result = JsonConvert.SerializeObject(""); } return(Json("", JsonRequestBehavior.AllowGet)); }
public JsonResult DetailsByIds(ProjectDeliverableDetailRequest obj) { ProjectDeliverableDetailResponse result; try { result = CABusinessProjectTrackingAPIClient.GetHttpResponse <ProjectDeliverableDetailResponse>(obj, CABPTMethodConstants.PROJECTSBYID); for (int i = 0; i < result.DeliverableList.Count; i++) { if (result.DeliverableList[i].PlannedDuration == "1 Days" || result.DeliverableList[i].PlannedDuration == "0 Days") { result.DeliverableList[i].PlannedDuration = result.DeliverableList[i].PlannedDuration.Replace("Days", "Day"); } if (result.DeliverableList[i].ActualDuration == "1 Days" || result.DeliverableList[i].ActualDuration == "0 Days") { result.DeliverableList[i].ActualDuration = result.DeliverableList[i].ActualDuration.Replace("Days", "Day"); } } return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(ex, out exception)))); } }
public JsonResult RoleList(rolelist rlst) { try { List <Permissions> list = null; DTO oDTO = null; RoleInfo roleInfo = null; var result = string.Empty; if (rlst != null) { if (rlst.operation == 1) //1-select,2-insert,3-update { list = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <Permissions> >(rlst, CABPTMethodConstants.ROLELIST); result = JsonConvert.SerializeObject(list); } else if (rlst.operation == 3) { oDTO = CABusinessProjectTrackingAPIClient.GetHttpResponse <DTO>(rlst, CABPTMethodConstants.ROLELIST); result = JsonConvert.SerializeObject(oDTO); } else { roleInfo = CABusinessProjectTrackingAPIClient.GetHttpResponse <RoleInfo>(rlst, CABPTMethodConstants.ROLELIST); result = JsonConvert.SerializeObject(roleInfo); } } return(Json(result, JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult ex = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out ex)))); } }
public JsonResult UpdateCheckListAccountLink(List <CheckListAccount> checkListAccountList) { string result = JsonConvert.SerializeObject(""); bool response = CABusinessProjectTrackingAPIClient.GetHttpResponse <bool>(checkListAccountList, CABPTMethodConstants.UPDATECHECKLISTACOUNTLINK); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetAllRoleList() { string queryString = "?UserID=" + HttpContext.User.Identity.Name; List <Role> roleListResponse = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <Role> >(queryString, CABPTMethodConstants.GETROLELIST); string result = JsonConvert.SerializeObject(roleListResponse); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult AllUtilizations(DeliverableRequest uobj) { if (Request.Cookies["AUTH_PTEmail"] != null && Request.Cookies["AUTHADMIN"] != null && Request.Cookies["AUTHADMIN"].Value == "Admin") { uobj.LoginMailId = ""; } List <UtilizationResponse> result = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <UtilizationResponse> >(uobj, CABPTMethodConstants.ALLUTILIZATIONS); return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); }
public JsonResult GetAllCheckListData(int ProjectId) { string queryString = "?UserID=UserName&ProjectId=" + ProjectId; queryString = queryString.Replace("UserName", HttpContext.User.Identity.Name); List <CheckListDetail> checkListResponse = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <CheckListDetail> >(queryString, CABPTMethodConstants.GETCHECKLIST); string result = JsonConvert.SerializeObject(checkListResponse); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetAdminroleusers() { try { List <Adminrolepermission> result = null; result = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <Adminrolepermission> >(string.Empty, CABPTMethodConstants.GETADMINROLEPERMISSION); return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult ex = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out ex)))); } }
public JsonResult SaveAdminuserPermission(Adminrolepermission reqObj) { try { int result = 0; result = CABusinessProjectTrackingAPIClient.GetHttpResponse <int>(reqObj, CABPTMethodConstants.ADMINROLEPERMISSION); return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult ex = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out ex)))); } }
public JsonResult ProjectFilters() { ReportFilterList reportFilterList = null; try { reportFilterList = CABusinessProjectTrackingAPIClient.GetHttpResponse <ReportFilterList>(string.Empty, CABPTMethodConstants.REPORTFILTERS); return(Json(JsonConvert.SerializeObject(reportFilterList), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out exception)))); } }
public JsonResult DeliverableDetailsUpdate(DeliverableDetailUpdateRequest obj) { DTO oDTO = null; try { oDTO = CABusinessProjectTrackingAPIClient.GetHttpResponse <DTO>(obj, CABPTMethodConstants.DELIVERABLEDETAILSUPDATE); return(Json(JsonConvert.SerializeObject(oDTO), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out exception)))); } }
public JsonResult StateList(Stage stage) { List <State> stateList = null; try { stateList = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <State> >(stage, CABPTMethodConstants.STATELIST); return(Json(JsonConvert.SerializeObject(stateList), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out exception)))); } }
// try // { // deliverables = CABusinessProjectTrackingAPIClient.GetHttpResponse<Deliverables>(devobj, CABPTMethodConstants.DELIVERABLEBYID); // return Json(JsonConvert.SerializeObject(deliverables), JsonRequestBehavior.AllowGet); // } // catch (Exception ex) // { // JsonExceptionResult exception = new JsonExceptionResult(); // return Json(JsonConvert.SerializeObject(new CABPTException(ex, out exception))); // } //} public JsonResult UpdateProjectDetail(UpdateProject obj) { DTO result = null; try { result = CABusinessProjectTrackingAPIClient.GetHttpResponse <DTO>(obj, CABPTMethodConstants.UPDATEPROJECTDETAIL); return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(ex, out exception)))); } }
public JsonResult AddNewClient(Clients client) { AddNewClientResponse clientRes = null; try { clientRes = CABusinessProjectTrackingAPIClient.GetHttpResponse <AddNewClientResponse>(client, CABPTMethodConstants.ADDNEWCLIENT); return(Json(JsonConvert.SerializeObject(clientRes), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { JsonExceptionResult jsonexc = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(ex, out jsonexc)))); } }
// GET: CheckList public ActionResult Index() { RouteAuthenticaion routeAuthenticaion = new RouteAuthenticaion(); if (!routeAuthenticaion.IsAuthorizedPage(MenuIDConstant.CHECKLIST)) { return(RedirectToAction("UnAuthorized", "Home")); } else { string queryString = "?UserID=" + HttpContext.User.Identity.Name; List <CheckList> response = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <CheckList> >(queryString, CABPTMethodConstants.CHECKLIST); ViewBag.RoleList = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <Role> >(queryString, CABPTMethodConstants.GETROLELIST); return(View(response)); } }
public JsonResult GetUserRole(string tblName) { UserRoleLookup result = null; try { string queryString = "?tblName=" + tblName; result = CABusinessProjectTrackingAPIClient.GetHttpResponse <UserRoleLookup>(queryString, CABPTMethodConstants.GETUSERROLE); return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(ex, out exception)))); } }
public JsonResult StateList(int stageid) { List <State> list = null; try { string queryString = "?StageId=" + stageid; list = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <State> >(queryString, CABPTMethodConstants.StateList); return(Json(JsonConvert.SerializeObject(list), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out exception)))); } }
public JsonResult ProjectResources(int ProjectId) { List <AddProjectUser> result = null; try { string queryString = "?ProjectId=" + ProjectId; result = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <AddProjectUser> >(queryString, CABPTMethodConstants.ProjectResources); return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out exception)))); } }
public bool CheckIsAdminUser(string Email) { try { string query = "?Email=" + HttpUtility.UrlEncode(Email); AdminUsers adminUsers = CABusinessProjectTrackingAPIClient.GetHttpResponse <AdminUsers>(query, CABPTMethodConstants.CheckIsAdmin); if (adminUsers.IsActive == false) { return(false); } return(true); } catch (Exception ex) { return(false); } }
public JsonResult AddedDeliverables(AddDeliverables delDetails) { try { DTO oDTO = null; if (delDetails != null) { oDTO = CABusinessProjectTrackingAPIClient.GetHttpResponse <DTO>(delDetails, CABPTMethodConstants.ADDDELIVERABLE); } return(Json(JsonConvert.SerializeObject(oDTO), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult jsonec = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out jsonec)))); } }
public JsonResult UpdateCheckList(CheckList checkList) { checkList = new CheckList { UserID = HttpContext.User.Identity.Name, CheckListID = checkList.CheckListID, Description = checkList.Description, UpdatedDate = DateTime.Now, IsActive = checkList.IsActive }; bool response = CABusinessProjectTrackingAPIClient.GetHttpResponse <bool>(checkList, CABPTMethodConstants.UPDATECHECKLIST); string result = JsonConvert.SerializeObject(response); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult AddedProjectDetails(AddProject prtdetails) { try { AddProjectResponse result = null; if (prtdetails != null) { result = CABusinessProjectTrackingAPIClient.GetHttpResponse <AddProjectResponse>(prtdetails, CABPTMethodConstants.ADDNEWPROJECT); } return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { JsonExceptionResult jsonexc = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(ex, out jsonexc)))); } }
public JsonResult UpdateResourceUtil(DTO dTO) { DTO oDTO = null; try { if (dTO.Status != null) { oDTO = CABusinessProjectTrackingAPIClient.GetHttpResponse <DTO>(dTO, CABPTMethodConstants.UPDATERESOURCEUTIL); } return(Json(JsonConvert.SerializeObject(oDTO), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out exception)))); } }
public JsonResult GetAllActiveCheckList(int RoleId = 1, int StageID = 1, int ProjectId = 0) { string queryString = "?UserID=UserName&ProjectId=" + ProjectId + "&StageId=" + StageID; queryString = queryString.Replace("UserName", HttpContext.User.Identity.Name); List <CheckList> checkListResponse = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <CheckList> >(queryString, CABPTMethodConstants.CHECKLIST); if (checkListResponse != null) { string result = JsonConvert.SerializeObject(checkListResponse.Where(x => x.IsActive && x.RoleId == RoleId)); return(Json(result, JsonRequestBehavior.AllowGet)); } else { return(Json("", JsonRequestBehavior.AllowGet)); } }
public JsonResult UpdateDeliverableDetails(UpdateDeliverableDtl dboj) { UpdateDeliverableDtlResponse oDTO = null; try { if (dboj != null) { oDTO = CABusinessProjectTrackingAPIClient.GetHttpResponse <UpdateDeliverableDtlResponse>(dboj, CABPTMethodConstants.UPDATEDELIVERALBEDETAILS); } return(Json(JsonConvert.SerializeObject(oDTO), JsonRequestBehavior.AllowGet)); } catch (Exception e) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(e, out exception)))); } }
public JsonResult DeliverablesUtildtl(pdDTO del) { DeliverablesUtilResponse resobj = null; try { if (del != null) { resobj = CABusinessProjectTrackingAPIClient.GetHttpResponse <DeliverablesUtilResponse>(del, CABPTMethodConstants.DELIVERABLEUTIL); } return(Json(JsonConvert.SerializeObject(resobj))); } catch (Exception ex) { JsonExceptionResult jsonexc = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(ex, out jsonexc)))); } }
public JsonResult AddAdAccount(ADAccountRequest reqObj) { ADAccountResponse result = null; try { //AddProjectUserResponse result = null; //var jsonSerialiser = new JavaScriptSerializer(); //var json = jsonSerialiser.Serialize(tblJson); //var user = JsonConvert.DeserializeObject<List<AddProjectUser>>(tblJson); //AddProjectUser obj = JsonConvert.DeserializeObject<AddProjectUser>(tblJson); result = CABusinessProjectTrackingAPIClient.GetHttpResponse <ADAccountResponse>(reqObj, CABPTMethodConstants.ADDUSERROLE); return(Json(JsonConvert.SerializeObject(result), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { JsonExceptionResult exception = new JsonExceptionResult(); return(Json(JsonConvert.SerializeObject(new CABPTException(ex, out exception)))); } }
public JsonResult AddCheckList(CheckList rlst) { CheckList checkList = new CheckList { UserID = HttpContext.User.Identity.Name, Description = rlst.Description, CreatedDate = DateTime.Now, UpdatedDate = DateTime.Now, IsActive = true, RoleId = rlst.RoleId }; int response = CABusinessProjectTrackingAPIClient.GetHttpResponse <int>(checkList, CABPTMethodConstants.ADDNEWCHECKLIST); string queryString = "?UserID=" + HttpContext.User.Identity.Name; List <CheckList> checkListResponse = CABusinessProjectTrackingAPIClient.GetHttpResponse <List <CheckList> >(queryString, CABPTMethodConstants.CHECKLIST); string result = JsonConvert.SerializeObject(checkListResponse); return(Json(result, JsonRequestBehavior.AllowGet)); }