public async Task <ActionResult> Create(ProjectResources prjRes) { try { string url = ConfigurationManager.AppSettings["URL"].ToString(); if (ModelState.IsValid) { //IDAL dal = (new DALFactory()).GetInstance(); //dal.AddProjectSkillResources(prjRes); InitializeServiceClient(); ProjectResourcesRequest projectResourcesRequest = new ProjectResourcesRequest(); projectResourcesRequest.projectId = prjRes.projectId; projectResourcesRequest.projectName = prjRes.projectName; projectResourcesRequest.skillResources = prjRes.skillResources; HttpResponseMessage response = await client.PostAsJsonAsync("Project/AddProjectSkillResources", projectResourcesRequest); } ViewBag.Message = "Data updated"; return(View(prjRes)); } catch (Exception ex) { //UserManager user = (UserManager)Session["CurrentUser"]; //LogHelper.AddLog("ProjectAvailableResourceController", ex.Message, ex.StackTrace, "HCL.Academy.Web", user.EmailID); TelemetryClient telemetry = new TelemetryClient(); telemetry.TrackException(ex); return(View(prjRes)); } }
public bool AddExpectedProjectResourceCountByProjectId(ProjectResourcesRequest request) { bool status = false; try { ProjectResources prjRes = new ProjectResources(); prjRes.projectId = request.projectId; prjRes.skillResources = request.skillResources; SqlSvrDAL dal = new SqlSvrDAL(request.ClientInfo); status = dal.AddExpectedProjectResourceCountByProjectId(prjRes); } catch (Exception ex) { //LogHelper.AddLog("ProjectController,AddExpectedProjectResourceCountByProjectId", ex.Message, ex.StackTrace, "HCL.Academy.Service", request.ClientInfo.emailId); TelemetryClient telemetry = new TelemetryClient(); telemetry.TrackException(ex); } return(status); }
public async Task <ActionResult> Create(ProjectResources prjRes) { InitializeServiceClient(); try { ProjectResourcesRequest req = new ProjectResourcesRequest(); req.projectId = prjRes.projectId; req.projectName = prjRes.projectName; req.skillResources = prjRes.skillResources; HttpResponseMessage response = await client.PostAsJsonAsync("Project/AddExpectedProjectResourceCountByProjectId", req); } catch (Exception ex) { //UserManager user = (UserManager)Session["CurrentUser"]; //LogHelper.AddLog("ProjectExpectedResourceController", ex.Message, ex.StackTrace, "HCL.Academy.Web", user.EmailID); TelemetryClient telemetry = new TelemetryClient(); telemetry.TrackException(ex); } client.Dispose(); return(View(prjRes)); }