public static string getConfig(int configID) { DataTable dt = WTS_Reports.HotlistConfig_Get(configID); config c = new config(dt); return(JsonConvert.SerializeObject(c)); }
public static void saveReportData(String SummaryOverviewsSection1, String SummaryOverviewsSection2, String Organization, String SelectedColumns, String filtersJSON, String Delimeter, String ddlValue, String Excel) { //this method calls the data base stored procedure in AJAX and binds the data to the session. The javascript will then trigger a post back, so the aspose stuff can execute and create the report. DataSet ds = new DataSet(); List <FilterObject> filters = new JavaScriptSerializer().Deserialize <List <FilterObject> >(filtersJSON); // 13419 - 7 var backLog = ""; if (ddlValue.ToString().ToLower() == "default (backlog)") { backLog = "true"; } else { backLog = "false"; } ds = WTS_Reports.getWorkloadSummary(SummaryOverviewsSection1, SummaryOverviewsSection2, Organization, filters, Delimeter, backLog); HttpContext.Current.Session["WorkloadSummaryData"] = ds; HttpContext.Current.Session["SelectedColumns"] = SelectedColumns; HttpContext.Current.Session["SummaryOverviewsSecion1"] = SummaryOverviewsSection1; HttpContext.Current.Session["SummaryOverviewsSecion2"] = SummaryOverviewsSection2; HttpContext.Current.Session["filters"] = filters; // 13419 - 7: HttpContext.Current.Session["ddlValue"] = ddlValue; HttpContext.Current.Session["Excel"] = Excel; return; }
private void loadGridData() { DataTable dt = null; dt = WTS_Reports.GetSRConfig(); if (dt != null) { this.DCC = dt.Columns; Page.ClientScript.RegisterArrayDeclaration("_dcc", JsonConvert.SerializeObject(DCC, Newtonsoft.Json.Formatting.None)); spanRowCount.InnerText = dt.Rows.Count.ToString(); //dt.Columns["Name"].SetOrdinal(1); // Messes up save. //dt.Columns["ReceiveSREMail"].SetOrdinal(2); //dt.Columns["IncludeInSRCounts"].SetOrdinal(3); InitializeColumnData(ref dt); dt.AcceptChanges(); int count = dt.Rows.Count; spanRowCount.InnerText = count.ToString(); } grdMD.DataSource = dt; grdMD.DataBind(); }
public static void deleteConfig(int configID) { string errorMessage = WTS_Reports.HotlistConfig_Delete(configID); if (errorMessage.Length > 0) { throw new Exception(errorMessage); } }
public static void updateReportParameters(string JSON, int paramsID) { string errorMessage = WTS_Reports.update_Report_Parameters(JSON, paramsID, HttpContext.Current.User.Identity.Name); if (errorMessage != "Success") { throw new Exception(errorMessage); } }
protected void Page_Load(object sender, EventArgs e) { this.reportID = WTS_Reports.getReportIDbyName("Workload Summary Report"); DataTable dt = new DataTable(); MembershipUser u = Membership.GetUser(); WTS_User user = new WTS_User(u.ProviderUserKey.ToString()); user.Load_GUID(); this.userID = user.ID; string userName = HttpContext.Current.User.Identity.Name; WTS_Reports.get_Report_Parameter_List(ref dt, userID, this.reportID); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { string name = row.Field <string>("Name"); string value = row.Field <Int32>("ParamsID").ToString(); ListItem li = new ListItem(name, value); if (row.Field <bool>("Process")) { li.Attributes.Add("OptionGroup", "Process Views"); } else { li.Attributes.Add("OptionGroup", "Custom Views"); } ddlParameters.Items.Insert(ddlParameters.Items.Count, li); } } ListItem def = new ListItem("Default", "Default"); def.Attributes.Add("OptionGroup", "Process Views"); ddlParameters.Items.Insert(0, def); // 13419 - 7: ListItem defBacklog = new ListItem("Default (Backlog)", "Default (Backlog)"); def.Attributes.Add("OptionGroup", "Process Views"); ddlParameters.Items.Insert(1, defBacklog); if (IsPostBack) { DataSet ds = (DataSet)Session["WorkloadSummaryData"]; String selectedColumns = (String)Session["SelectedColumns"]; String SummaryOverviewsSection1 = (String)Session["SummaryOverviewsSecion1"]; String SummaryOverviewsSection2 = (String)Session["SummaryOverviewsSecion2"]; String ddlValue = (String)Session["ddlValue"]; Excel = (String)Session["Excel"]; exportReport(ds, selectedColumns, SummaryOverviewsSection1, SummaryOverviewsSection2, ddlValue); } }
public static string getReportParameters(int paramsID) { string JSON = ""; string errorMessage = WTS_Reports.get_Report_Parameters(ref JSON, paramsID); if (errorMessage != "Success") { throw new Exception(errorMessage); } return(JSON); }
public static KeyValuePair <int, string> addReportParameters(string JSON, string name, int reportID, int userID, bool Process) { string userName = HttpContext.Current.User.Identity.Name; int paramsID = 0; string errorMessage = WTS_Reports.createReportParameters(JSON, reportID, name, userID, userName, Process, ref paramsID); if (errorMessage != "Success") { throw new Exception(errorMessage); } return(new KeyValuePair <int, string>(paramsID, name)); }
private void initControls() { DataTable dtStatus = MasterData.StatusList_Get(includeArchive: false); DataTable dtResources = UserManagement.LoadUserList(); DataTable dtConfigList = WTS_Reports.HostlistConfigList_Get(); load_ListBoxAssigned(dtResources); load_ListBoxRecipients(dtResources); load_ListBoxStatus(dtStatus.Copy()); load_ProductionPanel(dtStatus.Copy()); load_ddlRank(); load_ddlConfig(dtConfigList); }
public static KeyValuePair <int, string> addConfig(string prodStatus, int techMin, int busMin, int techMax, int busMax, string status, string assigned, string recipients, string message, string name) { int configID = 0; string errorMessage = WTS_Reports.createHostlistConfig(prodStatus, techMin, techMax, busMin, busMax, status, assigned, recipients, message, name, ref configID); if (errorMessage.Length > 0) { throw new Exception(errorMessage); } return(new KeyValuePair <int, string>(configID, name)); }
public static string SaveChanges(string rows) { Dictionary <string, string> result = new Dictionary <string, string>() { { "saved", "" }, { "ids", "" }, { "error", "" } }; bool saved = false; string ids = string.Empty, errorMsg = string.Empty, tempMsg = string.Empty; try { DataTable dtjson = (DataTable)JsonConvert.DeserializeObject(rows, (typeof(DataTable))); if (dtjson.Rows.Count == 0) { errorMsg = "Unable to save. An invalid list of changes was provided."; saved = false; } int id = 0, receiveSREMail = 0, includeInSRCounts = 0; HttpServerUtility server = HttpContext.Current.Server; //save foreach (DataRow dr in dtjson.Rows) { int.TryParse(dr["WTS_RESOURCEID"].ToString(), out id); int.TryParse(dr["ReceiveSREMail"].ToString(), out receiveSREMail); int.TryParse(dr["IncludeInSRCounts"].ToString(), out includeInSRCounts); WTS_Reports.SRRecipientSave(id, receiveSREMail, includeInSRCounts); } saved = true; } catch (Exception ex) { LogUtility.LogException(ex); saved = false; errorMsg = ex.Message; } result["saved"] = saved.ToString(); result["error"] = errorMsg; return(JsonConvert.SerializeObject(result, Formatting.None)); }
private void loadGridData() { DataTable dt = null; dt = WTS_Reports.GetDashboardData(); if (dt != null) { this.DCC = dt.Columns; assignedToRanks = dt.Rows[0]["Emergency Workload"].ToString(); assignedToRanks += "," + dt.Rows[0]["Current Workload"].ToString(); assignedToRanks += "," + dt.Rows[0]["Run The Business"].ToString(); assignedToRanks += "," + dt.Rows[0]["Staged Workload"].ToString(); assignedToRanks += "," + dt.Rows[0]["Unprioritized Workload"].ToString(); assignedToRankLabels = "Emergency Workload,Current Workload,Run The Business,Staged Workload,Unprioritized Workload"; } lblDateTime.InnerText = "My Work Tasks as of " + DateTime.Now.ToLongDateString() + ' ' + DateTime.Now.ToLongTimeString() + ':'; //grdMD.DataSource = dt; //grdMD.DataBind(); }
public static void TESTSendSrReport() { WTS_Reports.TESTSendSrReport(); return; }
public static void TESTsendHotlist(string prodStatus, int techMin, int busMin, int techMax, int busMax, string status, string assigned, string recipients, string message) { WTS_Reports.TESTsendHotlistOnDemand(prodStatus, techMin, busMin, techMax, busMax, status, assigned, recipients, message); return; }
public static string setActive(int configID) { string error = WTS_Reports.Hostlist_Config_SetActive(configID); return(error); }
public static void deleteReportParameters(int paramsID) { string errorMessage = WTS_Reports.deleteReportParameters(paramsID); }