public JsonResult GetDepartments(int OperationId) { NuPortalDBService.NuPortalService dbService = new NuPortalDBService.NuPortalService(); dbService.Url = Constants.DBService; try { string jsonString = dbService.SelectGridInfo(Convert.ToInt32(Session["CompanyId"]), OperationId); if (jsonString != string.Empty) { return(Json(jsonString, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { GeneralFunctions genFun = new GeneralFunctions(); genFun.LogError(ControllerContext.HttpContext, ex.Message, ex.TargetSite.Name, Convert.ToString(ControllerContext.RouteData.Values["action"]), Convert.ToString(ControllerContext.RouteData.Values["controller"])); genFun = null; return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); } finally { dbService = null; } return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); }
public JsonResult getReimbursementInfoforID(int reimbursementID) { Dictionary <string, string> outData = new Dictionary <string, string>(); NuPortalDBService.NuPortalService dBService = new NuPortalDBService.NuPortalService(); dBService.Url = Constants.DBService; try { string jsonLocation = dBService.SelectGridInfo(reimbursementID, 8); if (jsonLocation != string.Empty) { return(Json(jsonLocation, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { GeneralFunctions genFun = new GeneralFunctions(); genFun.LogError(ControllerContext.HttpContext, ex.Message, ex.TargetSite.Name, Convert.ToString(ControllerContext.RouteData.Values["action"]), Convert.ToString(ControllerContext.RouteData.Values["controller"])); genFun = null; } finally { dBService = null; } outData = new Dictionary <string, string>(); outData.Add("Error", "Error"); return(Json(JsonConvert.SerializeObject(outData), JsonRequestBehavior.AllowGet)); }
public JsonResult GetClosedTickets() { NuPortalDBService.NuPortalService Dbservice = new NuPortalDBService.NuPortalService(); Dbservice.Url = Constants.DBService; try { string JsonString = Dbservice.SelectGridInfo(Convert.ToInt32(Session["EmpId"]), 6); if (JsonString != string.Empty) { return(Json(JsonString, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { GeneralFunctions genFun = new GeneralFunctions(); genFun.LogError(ControllerContext.HttpContext, ex.Message, ex.TargetSite.Name, Convert.ToString(ControllerContext.RouteData.Values["action"]), Convert.ToString(ControllerContext.RouteData.Values["controller"])); genFun = null; return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); } finally { Dbservice.Dispose(); } return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); }
public JsonResult GetStatusUpdates() { NuPortalDBService.NuPortalService Dbservice = new NuPortalDBService.NuPortalService(); Dbservice.Url = Constants.DBService; try { string JsonString = Dbservice.SelectGridInfo(Convert.ToInt32(Session["EmpId"]), 34); if (JsonString != string.Empty) { return(Json(JsonString, JsonRequestBehavior.AllowGet)); } else { ViewBag.Message = "No Records Found"; } } catch (Exception ex) { return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); } finally { Dbservice.Dispose(); } return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); }
public JsonResult GetAllOpenings(int Operation) { NuPortalDBService.NuPortalService Dbservice = new NuPortalDBService.NuPortalService(); Dbservice.Url = Constants.DBService; try { return(Json(Dbservice.SelectGridInfo(Convert.ToInt32(Session["CompanyId"]), Operation), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { GeneralFunctions genFun = new GeneralFunctions(); genFun.LogError(ControllerContext.HttpContext, ex.Message, ex.TargetSite.Name, Convert.ToString(ControllerContext.RouteData.Values["action"]), Convert.ToString(ControllerContext.RouteData.Values["controller"])); genFun = null; return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); } finally { Dbservice.Dispose(); } }
public JsonResult GetCompletedMyTasks() { NuPortalDBService.NuPortalService Dbservice = new NuPortalDBService.NuPortalService(); Dbservice.Url = Constants.DBService; try { string JsonString = Dbservice.SelectGridInfo(Convert.ToInt32(Session["EmpId"]), 2); if (JsonString != string.Empty) { return(Json(JsonString, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); } finally { Dbservice.Dispose(); } return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); }
public JsonResult GetOpenTask(int ProjId) { NuPortalDBService.NuPortalService Dbservice = new NuPortalDBService.NuPortalService(); Dbservice.Url = Constants.DBService; try { string JsonString = Dbservice.SelectGridInfo(ProjId, 11); if (JsonString != string.Empty) { return(Json(JsonString, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); } finally { Dbservice.Dispose(); } return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet)); }
public JsonResult GetTaskDetails(int TaskId, int operationId, string TaskName, int?Type) { Dictionary <string, string> outData = new Dictionary <string, string>(); NuPortalDBService.NuPortalService Dbservice = new NuPortalDBService.NuPortalService(); Dbservice.Url = Constants.DBService; NuPortalEmpService.NuPortalEmployeeService empService = new NuPortalEmpService.NuPortalEmployeeService(); empService.Url = Constants.EmpService; try { if (Type == 3 || Type == 2) { if (operationId == 1) { string JsonString = Dbservice.SelectGridInfo(TaskId, 37); if (JsonString != string.Empty) { return(Json(JsonString, JsonRequestBehavior.AllowGet)); } } else if (operationId == 2) { string ResourceDetails = empService.SelectEmployeeInfo(TaskId, 53); if (ResourceDetails != string.Empty) { return(Json(ResourceDetails, JsonRequestBehavior.AllowGet)); } } } else { if (operationId == 1) { string JsonString = Dbservice.SelectGridInfo(TaskId, 3); if (JsonString != string.Empty) { return(Json(JsonString, JsonRequestBehavior.AllowGet)); } } else if (operationId == 2) { string ResourceDetails = empService.SelectEmployeeInfo(TaskId, 29); if (ResourceDetails != string.Empty) { return(Json(ResourceDetails, JsonRequestBehavior.AllowGet)); } } } } catch (Exception ex) { outData = new Dictionary <string, string>(); outData.Add("Error", "Error"); return(Json(JsonConvert.SerializeObject(outData), JsonRequestBehavior.AllowGet)); } finally { empService = null; } return(Json(Common_Library.Constants.JsonError)); }