public Response GetWorklogs(Int64 projectid = 0, string workgroups = "", string users = "", string logtype = "", string startdate = "", string enddate = "") { Response response = new Response(); try { PM_WorkLogBL tb = new PM_WorkLogBL(); var wlogs = new List <PM_WorkLog>(); if (string.IsNullOrEmpty(logtype)) { wlogs = tb.ToList("getworklogs_summary_table", projectid, workgroups, users, logtype, startdate, enddate); } else { wlogs = tb.ToList("getworklogs", projectid, workgroups, users, logtype, startdate, enddate); } response.Status = "true"; response.Message = "OK"; response.Value = wlogs; return(response); } catch (Exception ex) { response.Status = "false"; response.Message = ex.Message.ToString(); return(response); } }
public JsonResult WorkLogsCost(string filter, string value, string value2) { PM_WorkLogBL tb = new PM_WorkLogBL(); value = string.IsNullOrEmpty(value) ? DateTime.Now.ToShortDateString() : value; value2 = string.IsNullOrEmpty(value2) ? DateTime.Now.ToShortDateString() : value2; var wlogsCostChart = tb.ToList("Work_Log_Charts", value, value2); var wlogsCost = tb.ToList(filter, value, value2); List <p_pm_worklog> chartsManagenData = wlogsCost.GroupBy(x => x.Name).Select(p => new p_pm_worklog { Name = p.Key, childp_pm_worklog = p.GroupBy(pp => pp.LogType).Select(xc => new p_pm_worklog() { LogHours = xc.Sum(x => x.LogHours), LogType = xc.Key, Name = p.Key }).ToList() }).ToList(); var fnlobj = chartsManagenData.Select(x => x.childp_pm_worklog).ToList(); var result = new { WlogsCost = wlogsCost, wlogsCostChart = wlogsCostChart }; return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetWorklogs(string filter, string value, string value2, string SelectOption) { PM_WorkLogBL tb = new PM_WorkLogBL(); value = string.IsNullOrEmpty(value) ? DateTime.Now.ToShortDateString() : value; value2 = string.IsNullOrEmpty(value2) ? DateTime.Now.ToShortDateString() : value2; var wlogs = tb.ToList(filter, value, value2, SelectOption); //var fcHistory = tb.FcHistoryList(filter, value, value2, ProjectId, MilestoneId, StageId); var result = new { Worklogs = wlogs }; return(Json(result, JsonRequestBehavior.AllowGet)); }