예제 #1
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));
 }
예제 #2
0
 public JsonResult GetMonthlyRating(int Month, int Year, int Operation)
 {
     NuPortalDBService.NuPortalService Dbservice = new NuPortalDBService.NuPortalService();
     Dbservice.Url = Constants.DBService;
     try
     {
         string jsonString = Dbservice.SelectDetailsByMonth(Convert.ToInt32(Session["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 = null;
     }
     return(Json(Common_Library.Constants.JsonError, JsonRequestBehavior.AllowGet));
 }
예제 #3
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));
 }