예제 #1
0
 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));
 }
예제 #2
0
 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));
 }
예제 #3
0
 public JsonResult GetEmployeeProgressChat(int empId, int Month, int Year, int Operation)
 {
     NuPortalDBService.NuPortalService dbService = new NuPortalDBService.NuPortalService();
     dbService.Url = Constants.DBService;
     try
     {
         Dictionary <string, string> outData = new Dictionary <string, string>();
         string JsonString = dbService.SelectDetailsByMonth(empId, Month, Year, Operation);
         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 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(); }
 }
예제 #5
0
 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));
 }
예제 #6
0
 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));
 }
예제 #7
0
 public JsonResult GetMonthBasedDetails(int Month, int Year, int Operation)
 {
     NuPortalDBService.NuPortalService Dbservice = new NuPortalDBService.NuPortalService();
     Dbservice.Url = Constants.DBService;
     try
     {
         Dictionary <string, string> outData = new Dictionary <string, string>();
         string JsonString = Dbservice.SelectDetailsByMonth(Convert.ToInt32(Session["EmpId"]), Month, Year, Operation);
         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));
 }
예제 #8
0
 public JsonResult BindTasks(int Project, int EmpId)
 {
     NuPortalDBService.NuPortalService dbService = new NuPortalDBService.NuPortalService();
     dbService.Url = Constants.DBService;
     try
     {
         string JsonString = dbService.CancelItem(Project, EmpId == 0 ? Convert.ToInt16(Session["EmpId"]) : EmpId, 8);
         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;
     }
     finally { dbService.Dispose(); }
     return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet));
 }