protected void Page_Load(object sender, EventArgs e) { try { if (Request.QueryString["Stage"] != null) { TransactionStageControlId1.ActiveStage = Request.QueryString["Stage"].ToString(); } if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); var queryArgument = new QueryArgument(UserContext.DataBaseInfo) { filter1 = Constants.DvStages, filter2 = TransactionStageControlId1.ActiveStage, FilterKey = Constants.ReferencesType }; var references = _controlPanel.GetReferences(queryArgument); BindReferences(references); ForecastingPart.IsVisiablePartText = true; ForecastingPart.IsEnablePartType = false; ForecastingHead.SetRequestLoctionAutopostBack = true; //ForecastingHead.IsEnableLocation = false; ForecastingHead.IsEnableCustomer = true; BindData(); } catch (Exception ex) { EventLogger.LogEvent(SysEventType.ERROR.ToString(), "Error", "FieldRequest failed in page load with exception ", ex); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); SetPageProperties(); var filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, Constants.UnitTypes), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextUnit), new KeyValuePairItem(Constants.masterType, Constants.DdlWFComponents) }; _genericClass.LoadDropDown(ddlUnit, filter, null, UserContext.DataBaseInfo); filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter4, Constants.DdlFilterTypes), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextMaterialType), new KeyValuePairItem(Constants.masterType, Constants.DdlMATCategories) }; _genericClass.LoadDropDown(ddlPartType, filter, null, UserContext.DataBaseInfo); BindData(BindType.List); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); SetPageProperties(); var filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, Constants.CountryType), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextTrnCurrency), new KeyValuePairItem(Constants.masterType, Constants.DdlCountry) }; _genericClass.LoadDropDown(ddlTrnCurrency, filter, null, UserContext.DataBaseInfo); SessionManagement <UploadDetail> .SetValue(Constants.ImportDataSessionKey, new UploadDetail { IsReady = false }); //AddressControl.HideMobileField = false; if (CType == Constants.CompanyCType || CType == Constants.BuCType) { secContactDetails.Style.Add("display", "none"); } else { secTaxDetails.Style.Add("display", "none"); secFPeriod.Style.Add("display", "none"); GridViewTable.Columns[3].Visible = false; GridViewTable.Columns[4].Visible = false; } BindData(BindType.List); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); SetPageProperties(); var filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter4, Constants.DdlFilterTypes), new KeyValuePairItem(Constants.masterType, Constants.DdlMATCategories) }; Categories = _genericClass.LoadList(filter, null, UserContext.DataBaseInfo); filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, UserContext.UserProfile.Designation.Id.Trim() == "SA"? "":UserContext.UserProfile.Designation.Id.Trim()), new KeyValuePairItem(Constants.masterType, Constants.DdlFilterUser) }; Users = _genericClass.LoadList(filter, null, UserContext.DataBaseInfo); BindData(BindType.List); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); SetPageProperties(); var filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, Constants.DvTeam), new KeyValuePairItem(Constants.masterType, Constants.DdlWFComponents) }; Teams = _genericClass.LoadList(filter, null, UserContext.DataBaseInfo); if (UserContext.UserProfile.Designation.Id.Trim() == Constants.AdminDesignationId) { IsEnableAddButton = true; } else { IsEnableAddButton = false; } BindData(BindType.List); }
protected void Page_Load(object sender, EventArgs e) { //txtEmail.Attributes.Add("onblur", "return validateEmail(<%=" + txtEmail.ClientID + "%>);"); if (!IsPostBack) { this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); SetPageProperties(); var filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, Constants.CountryType), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextCountry), new KeyValuePairItem(Constants.masterType, Constants.DdlCountry) }; _genericClass.LoadDropDown(ddlCountry, filter, null, UserContext.DataBaseInfo); filter = new KeyValuePairItems { //new KeyValuePairItem(Constants.filter1, Constants.BranchCType), //new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextBranch), //new KeyValuePairItem(Constants.masterType,Constants.DdlBranch) new KeyValuePairItem(Constants.filter1, Constants.WHCType), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextLocation), new KeyValuePairItem(Constants.masterType, Constants.TableAccounts) }; _genericClass.LoadDropDown(ddlBranch, filter, null, UserContext.DataBaseInfo); filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, Constants.SysDesignationCType), new KeyValuePairItem(Constants.filter2, Constants.SysDesignation), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextDesig), new KeyValuePairItem(Constants.masterType, Constants.DdlCatHeaderData) }; _genericClass.LoadDropDown(ddlDesignation, filter, null, UserContext.DataBaseInfo); filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, Constants.DeptCType), new KeyValuePairItem(Constants.filter2, Constants.DdlDepartment), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextDept), new KeyValuePairItem(Constants.masterType, Constants.DdlCatHeaderData) }; _genericClass.LoadDropDown(ddlDept, filter, null, UserContext.DataBaseInfo); filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, Constants.WHCType), new KeyValuePairItem(Constants.filter2, Constants.DvConfigWh), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextWh), new KeyValuePairItem(Constants.masterType, Constants.DdlCatHeaderData) }; _genericClass.LoadDropDown(ddlWH, filter, null, UserContext.DataBaseInfo); //Reserve a spot in Session for the UploadDetail object SessionManagement <UploadDetail> .SetValue(Constants.ImportDataSessionKey, new UploadDetail { IsReady = false }); BindData(BindType.List); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); BindData(BindType.List); } }
private void SetPageProperties() { var menuSettings = GeneralUtilities.GetCurrentMenuSettings(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); if (menuSettings != null) { pageTitle.InnerText = menuSettings.PageTitle; } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); SetPageProperties(); BindData(null); }
private string LoadMenus() { var menuMarkup = new StringBuilder(); try { var menuId = QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString()); var mainMenus = DataSource; foreach (var mainMenu in mainMenus) { var mainMenuMarkup = new StringBuilder(); var subMenuMarkup = new StringBuilder(); var subMenus = mainMenu.SubMenus; var activeMenuCode = menuId; var firstOrDefault = subMenus.FirstOrDefault(x => String.Equals(x.MenuId, menuId, StringComparison.CurrentCultureIgnoreCase)); if (firstOrDefault != null) { activeMenuCode = firstOrDefault.MenuCode; } // Check whether the current menu is an active parent or not. //0,1 -> activeCSS, 2 -> url or Javascript, 3 -> Menu title, 4 -> SubMenu Markup mainMenuMarkup.AppendFormat(GlobalCustomResource.MainMenu, (mainMenu.MenuCode.Trim() == activeMenuCode.Substring(0, 12)) ? Constants.ActiveMenuUlCss : string.Empty, (mainMenu.MenuCode.Trim() == activeMenuCode.Substring(0, 12)) ? Constants.ActiveMenuAnchorCss : string.Empty, (string.IsNullOrEmpty(mainMenu.MenuUrl) ? Constants.HrefJs : mainMenu.MenuUrl), //Constants.DefaultAppPagesDirectory + mainMenu.MenuUrl), (string.IsNullOrEmpty(mainMenu.MenuUrl) ? GlobalCustomResource.ArrowNode : string.Empty), mainMenu.MenuName, Constants.SubMenuPlaceHolder, mainMenu.MenuIcon); foreach (var menuItem in subMenus) { // Check whether the current menu is an active child or not. subMenuMarkup.AppendFormat(GlobalCustomResource.SubMenu, menuItem.MenuCode.Trim() == activeMenuCode ? Constants.SelectedSubMenuCss : string.Empty, Constants.WebPageRootHtml + menuItem.MenuUrl, menuItem.MenuName); } // add the submenu markup with the main menu markup mainMenuMarkup.Replace(Constants.SubMenuPlaceHolder, !String.IsNullOrEmpty(subMenuMarkup.ToString()) ? string.Format(GlobalCustomResource.SubMenuWrapper, subMenuMarkup) : string.Empty); menuMarkup.Append(mainMenuMarkup); } } catch (Exception Ex) { AuditLog.LogEvent(SysEventType.ERROR, "Menu Binding", "Exception on Binding Menu..", Ex); } return(menuMarkup.ToString()); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["Stage"] != null) { TransactionStageControlId1.ActiveStage = Request.QueryString["Stage"].ToString().Trim(); } if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); fillHeaderGrid(); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["Stage"] != null) { TransactionStageControlId1.ActiveStage = Request.QueryString["Stage"].ToString().Trim(); } if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); CategoryType = Request.QueryString["CategoryType"].ToString().Trim() == "01" ? "01,03" : Request.QueryString["CategoryType"].ToString().Trim(); pageTitle.InnerText = Request.QueryString["PageTitle"].ToString().Trim(); if (Request.QueryString["SubLinkType"] != null) { StageType = Request.QueryString["SubLinkType"].ToString().Trim(); } var queryArgument = new QueryArgument(UserContext.DataBaseInfo) { filter1 = Constants.DvStages, filter2 = TransactionStageControlId1.ActiveStage.ToString().Trim(), FilterKey = Constants.ReferencesType }; var references = _controlPanel.GetReferences(queryArgument); BindReferences(references); ForecastingGridViewListControl.SetText1(Constants.LabelSREnter, Constants.ToolTipSrNumberSearch, 12); if (StageType == Constants.BillTrackingType) { DivFilter = true; ForecastingEditPart.SetCurrentStatusAutopostBack = true; ForecastingGridViewListControl.Ddl1.Items.Add(new ListItem("BackOrder", "BO")); ForecastingGridViewListControl.Ddl1.Items.Add(new ListItem("StockTransfer", "ST")); ForecastingGridViewListControl.Ddllbl1 = "Select Status"; //ForecastingGridViewListControl.Ddl2.Items.Add(new ListItem("Ordering", Constants.OrderingType)); //ForecastingGridViewListControl.Ddl2.Items.Add(new ListItem("Deviation Order", Constants.DeviationOrder)); //ForecastingGridViewListControl.Ddllbl2 = "Select Order/Deviation"; } else { DivFilter = false; } fillHeaderGrid(); ForecastingPart.addKeyupText(ForecastingPart.txtqty, "onkeyup"); ForecastingEditPart.IsHeader = false; ForecastingEditPart.IsPanelDiv = false; }
private void BindReport(string reportUrl, string datasetName) { var configurations = GetConfigurations(); configurations.Insert(0, new KeyValuePairItem(Constants.RptParaUserId, UserContext.UserProfile.UCode.ToString())); configurations.Insert(1, new KeyValuePairItem(Constants.RptParaRptId, QueryStringManagement.GetValue(Constants.ReportCodeQsKey))); configurations.Insert(2, new KeyValuePairItem(Constants.RptParaRptId, QueryStringManagement.GetValue(Constants.ReportCodeQsKey))); var objContainer = _genericClass.GetReportData(configurations, UserContext.DataBaseInfo); StageWiseOrderViewer.ProcessingMode = ProcessingMode.Local; LocalReport rep = StageWiseOrderViewer.LocalReport; ReportDataSource dsMaintenanceDS = new ReportDataSource(); dsMaintenanceDS.Name = datasetName; // Data Source Name dsMaintenanceDS.Value = objContainer.Result; // Data Values Assembly assembly = Assembly.LoadFrom(Server.MapPath(@"~\bin\FBTS.Reports.dll")); Stream stream = assembly.GetManifestResourceStream(reportUrl); StageWiseOrderViewer.LocalReport.LoadReportDefinition(stream); StageWiseOrderViewer.LocalReport.Refresh(); rep.DataSources.Clear(); rep.DataSources.Add(dsMaintenanceDS); //RDLC report DataSource(Tablix Datasource name) ReportParameter p1 = new ReportParameter("rptParam1", ddlStage.Text); ReportParameter p2 = new ReportParameter("rptParam2", FILTER); ReportParameter p3 = new ReportParameter("location", ddlLocation.SelectedItem.Text); ReportParameter p4 = new ReportParameter("stage", ddlStage.SelectedItem.Text); ReportParameter p5 = new ReportParameter("logged", UserContext.UserProfile.Name); ReportParameter p6 = new ReportParameter("orderType", ddlOrderType.SelectedValue.ToString().Trim() == string.Empty ? string.Empty : ddlOrderType.SelectedItem.Text); ReportParameter p7 = new ReportParameter("pending", chkPending.Checked ? "Pending" : string.Empty); ReportParameter p8 = new ReportParameter("fromDate", FROMDATE == Convert.ToDateTime(Constants.DefaultDate) ? string.Empty : Dates.FormatDate(FROMDATE, Constants.Format02)); ReportParameter p9 = new ReportParameter("toDate", TODATE == Convert.ToDateTime(Constants.DefaultDate) ? string.Empty : Dates.FormatDate(TODATE, Constants.Format02)); //ReportParameter p7 = new ReportParameter("deviationOrder", UserContext.UserProfile.Name); //ReportParameter p3 = new ReportParameter("rptParam3", STATUS);//Passing the Parameters //ReportParameter tax = new ReportParameter("taxParam", tax_detail);//Passing the Parameters StageWiseOrderViewer.LocalReport.SetParameters(new ReportParameter[] { p1, p2, p3, p4, p5, p6, p7, p8, p9 }); rep.Refresh(); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); DashBoardControlGPRSId.SetHeader = "GPRS"; DashBoardControlC09Id.SetHeader = "C-09"; DashBoardControlXRayId.SetHeader = "X-Ray"; BindData("01"); BindData("02"); BindData("03"); }
private void SetPageProperties() { var menuSettings = GeneralUtilities.GetCurrentMenuSettings(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); if (menuSettings == null) { return; } pageTitle.InnerText = menuSettings.PageTitle; LType = menuSettings.Type; LMode = menuSettings.Mode; IsUpload = menuSettings.GetSettingsValue("IsUpload").ToBool(); BindData(BindType.List); }
private void BindReport(string reportUrl, string datasetName) { var configurations = GetConfigurations(); configurations.Insert(0, new KeyValuePairItem(Constants.RptParaUserId, UserContext.UserProfile.UCode.ToString())); configurations.Insert(1, new KeyValuePairItem(Constants.RptParaRptId, QueryStringManagement.GetValue(Constants.ReportCodeQsKey))); configurations.Insert(2, new KeyValuePairItem(Constants.RptParaRptId, QueryStringManagement.GetValue(Constants.ReportCodeQsKey))); var objContainer = _genericClass.GetReportData(configurations, UserContext.DataBaseInfo); ReportViewer.ProcessingMode = ProcessingMode.Local; LocalReport rep = ReportViewer.LocalReport; ReportDataSource dsMaintenanceDS = new ReportDataSource(); dsMaintenanceDS.Name = datasetName; // Data Source Name dsMaintenanceDS.Value = objContainer.Result; // Data Values // rep.DataSources.Clear(); Assembly assembly = Assembly.LoadFrom(Server.MapPath(@"~\bin\FBTS.Reports.dll")); Stream stream = assembly.GetManifestResourceStream(reportUrl); ReportViewer.LocalReport.LoadReportDefinition(stream); //ReportViewer1.LocalReport.ReportPath = Server.MapPath(reportUrl);//Report Path ReportViewer.LocalReport.Refresh(); rep.DataSources.Clear(); rep.DataSources.Add(dsMaintenanceDS); //RDLC report DataSource(Tablix Datasource name) ReportParameter p1 = new ReportParameter("partType", ddlPartType.SelectedItem.Text); ReportParameter p2 = new ReportParameter("location", ddlLocation.SelectedItem.Text); ReportParameter p3 = new ReportParameter("reportDetail", "Detail"); ReportParameter p4 = new ReportParameter("logged", UserContext.UserProfile.Name); ReportParameter p5 = new ReportParameter("fromDate", FROMDATE == Convert.ToDateTime(Constants.DefaultDate) ? string.Empty : Dates.FormatDate(FROMDATE, Constants.Format02)); ReportParameter p6 = new ReportParameter("toDate", TODATE == Convert.ToDateTime(Constants.DefaultDate) ? string.Empty : Dates.FormatDate(TODATE, Constants.Format02)); ReportViewer.LocalReport.SetParameters(new ReportParameter[] { p1, p2, p3, p4, p5, p6 }); rep.Refresh(); }
private void BindReport(string reportUrl, string datasetName) { var configurations = GetConfigurations(); configurations.Insert(0, new KeyValuePairItem(Constants.RptParaUserId, UserContext.UserProfile.UCode.ToString())); configurations.Insert(1, new KeyValuePairItem(Constants.RptParaRptId, QueryStringManagement.GetValue(Constants.ReportCodeQsKey))); configurations.Insert(2, new KeyValuePairItem(Constants.RptParaRptId, QueryStringManagement.GetValue(Constants.ReportCodeQsKey))); var objContainer = _genericClass.GetReportData(configurations, UserContext.DataBaseInfo); LocationViewer.ProcessingMode = ProcessingMode.Local; LocalReport rep = LocationViewer.LocalReport; ReportDataSource dsMaintenanceDS = new ReportDataSource(); dsMaintenanceDS.Name = datasetName; // Data Source Name dsMaintenanceDS.Value = objContainer.Result; // Data Values // rep.DataSources.Clear(); Assembly assembly = Assembly.LoadFrom(Server.MapPath(@"~\bin\FBTS.Reports.dll")); Stream stream = assembly.GetManifestResourceStream(reportUrl); LocationViewer.LocalReport.LoadReportDefinition(stream); //ReportViewer1.LocalReport.ReportPath = Server.MapPath(reportUrl);//Report Path LocationViewer.LocalReport.Refresh(); rep.DataSources.Clear(); rep.DataSources.Add(dsMaintenanceDS); //RDLC report DataSource(Tablix Datasource name) //ReportParameter p1 = new ReportParameter("rptParam1", "Customer Vendor Master");//Passing the Parameters //ReportParameter p2 = new ReportParameter("rptParam2", " ");//Passing the Parameters //ReportParameter tax = new ReportParameter("taxParam", tax_detail);//Passing the Parameters //LocationViewer.LocalReport.SetParameters(new ReportParameter[] { p1, p2, tax }); rep.Refresh(); }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); SetPageProperties(); BasicAddress.IsVisiableLocationDdl = true; var filter = new KeyValuePairItems { new KeyValuePairItem(Constants.filter1, Constants.WHCType), new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextLocation), new KeyValuePairItem(Constants.masterType, Constants.TableAccounts) }; _genericClass.LoadDropDown(BasicAddress.LocationControl, filter, null, UserContext.DataBaseInfo); BasicAddress.SetCityLabel = Constants.LocationLablel; }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); SetPageProperties(); var filter = new KeyValuePairItems { new KeyValuePairItem(Constants.DdldefaultText, Constants.DdlDefaultTextRegion), new KeyValuePairItem(Constants.masterType, Constants.DdlRegion) }; _genericClass.LoadDropDown(ddlRegion, filter, null, UserContext.DataBaseInfo); divButtons.Visible = false; GridViewTable.Columns[3].Visible = false; BindData(); LocationDetails = _locations; }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["Stage"] != null) { TransactionStageControlId1.ActiveStage = Request.QueryString["Stage"].ToString().Trim(); } if (IsPostBack) { return; } this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); var queryArgument = new QueryArgument(UserContext.DataBaseInfo) { filter1 = Constants.DvStages, filter2 = TransactionStageControlId1.ActiveStage, FilterKey = Constants.ReferencesType }; var references = _controlPanel.GetReferences(queryArgument); BindReferences(references); fillHeaderGrid(); ForecastingPart.addKeyupText(ForecastingPart.txtqty, "onkeyup"); }
protected void Page_Load(object sender, EventArgs e) { this.ValidatePage(UserContext, QueryStringManagement.GetValue(Constants.MenuCodeQsKey, Guid.Empty.ToString())); }