public override void Reload(BaseModuleUserControl sender, NavigationParameterObject args = null) { if (base.CheckAutorisation()) { this.BindUserData(); } }
protected void LogoutButton_Click(object sender, EventArgs e) { SessionObject.CurrentBitSiteUser = null; DataBind(null); ModuleNavigationActionLite navigationAction = GetNavigationActionByTagName("{LogoutButton}"); if (navigationAction.NavigationType == BitPlate.Domain.Modules.NavigationTypeEnum.NavigateToPage) { if (navigationAction.NavigationUrl != null) { Response.Redirect(navigationAction.NavigationUrl); } } else if (navigationAction.NavigationType == NavigationTypeEnum.ShowDetailsInModules) { foreach (string drillDownModuleId in navigationAction.RefreshModules) { BaseModuleUserControl moduleControl = (BaseModuleUserControl)FindControlRecursive(this.Page.Master, "Mod" + drillDownModuleId.Replace("-", "")); if (moduleControl != null) { moduleControl.Reload(this); } } } //else //{ // this.Visible = false; //} }
protected void DrillUpLink_Click(Object sender, EventArgs args) { LinkButton link = (LinkButton)sender; Guid dataId; Guid.TryParse(link.CommandArgument, out dataId); ModuleNavigationActionLite action = GetNavigationActionByTagName("{DrillUpLink}"); if (action.NavigationType == NavigationTypeEnum.NavigateToPage) { Response.Redirect(action.NavigationUrl); } else if (action.NavigationType == NavigationTypeEnum.ShowDetailsInModules) { foreach (string drillDownModuleId in action.RefreshModules) { BaseModuleUserControl moduleControl = (BaseModuleUserControl)FindControlRecursive(this.Page.Master, "Mod" + drillDownModuleId.Replace("-", "")); if (moduleControl != null) { moduleControl.Reload(this, new NavigationParameterObject() { Name = "dataid", GuidValue = dataId }); //{ //SelectAndShowData(dataId); } } } string js = link.OnClientClick; ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "navigation" + this.ModuleID.ToString("N"), js, true); }
private void HandleNavigation() { ModuleNavigationActionLite navigationAction = GetNavigationActionByTagName("{SubmitButton}"); switch (navigationAction.NavigationType) { case NavigationTypeEnum.NavigateToPage: Response.Redirect(navigationAction.NavigationUrl); break; case NavigationTypeEnum.ShowDetailsInModules: foreach (string drillDownModuleId in navigationAction.RefreshModules) { BaseModuleUserControl moduleControl = (BaseModuleUserControl)FindControlRecursive(this.Page.Master, "Mod" + drillDownModuleId.Replace("-", "")); if (moduleControl != null) { moduleControl.Reload(this); } } break; default: break; } }
protected void ClearFilter_Event(Object sender, EventArgs args) { ModuleNavigationActionLite action = GetNavigationActionByTagName("{ApplyFilter}"); if (action.NavigationType == NavigationTypeEnum.NavigateToPage) { Response.Redirect(action.NavigationUrl); } else if (action.NavigationType == NavigationTypeEnum.ShowDetailsInModules) { foreach (string drillDownModuleId in action.RefreshModules) { BaseModuleUserControl moduleControl = (BaseModuleUserControl)FindControlRecursive(this.Page.Master, "Mod" + drillDownModuleId.Replace("-", "")); if (moduleControl != null) { moduleControl.Reload(this, new NavigationParameterObject() { Name = "dataid", GuidValue = Guid.Empty }); //{ //SelectAndShowData(dataId); } } foreach (Control control in this.Controls) { if (control.ID != null) { string filterColumnID = Regex.Match(control.ID, "_(.*?)_").ToString().Replace("_", ""); DataField dataField = null; if (filterColumnID == "02f78e8cfc9c40ca9dd432eadc01f92a") //02f78e8c-fc9c-40ca-9dd4-32eadc01f92a = searchall ID { //SearchAllVelden. In deze velden wordt gezocht naar de invoer van de SearchAllTextbox filterColumnID = "ID, Name, Title"; } else { dataField = GetDataFieldByID(filterColumnID); } if (dataField != null) { ClearControlValue(control); } //Zoek in alle dataitem velden. if (dataField == null && filterColumnID != "" && control != null && control.GetType().Name == "TextBox") { ClearControlValue(control); } } } //stuur eventueel javascript naar de browser zodat deze wordt uitgevoerd nadat pagina opnieuw is gerenderd /* string js = linkButton.OnClientClick; * if (js != null && js != "") * { * ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "navigation" + this.ModuleID.ToString("N"), js, true); * } */ } }
public override void Reload(BaseModuleUserControl sender, NavigationParameterObject args = null) { if (base.CheckAutorisation()) { this.LoadControls(); //if (this.PanelSubscriberFrom != null) this.PanelSubscriberFrom.Visible = true; } }
public override void Reload(BaseModuleUserControl sender, NavigationParameterObject args = null) { if (base.CheckAutorisation()) { if (args != null && args.Name == "dataid") { } } }
/// <summary> /// Module wordt vanuit andere module aangeroepen met ajax call (MS-updatepanels) /// Bij NavigateAction van type ShowDetailsInModules /// </summary> /// <param name="sender"></param> /// <param name="args"></param> public override void Reload(BaseModuleUserControl sender, NavigationParameterObject args = null) { if (base.CheckAutorisation()) { if (args != null && args.Name == "dataid") { this.SelectAndShowData(args.GuidValue); } } }
public override void Reload(BaseModuleUserControl sender, NavigationParameterObject args = null) { if (base.CheckAutorisation()) { if (args != null && args.Name == "dataid") { //Niet nodig in !ispostback wordt het dataid argument altijd uit gelezen bij een postback. //Het vinkje bij reload doet dus ook geen vinkert meer. //this.UpdateSelectedNode(args.GuidValue); } } }
public override void Reload(BaseModuleUserControl sender, NavigationParameterObject args = null) { if (base.CheckAutorisation()) { this.FindControls(); if (MessageLabel != null) { MessageLabel.Text = ""; } this.SetUserVariable(); this.FillControlsWithData(); } }
public void SubmitButton_Click(object sender, EventArgs e) { if (UserNameTextbox.Text.Trim() != "" && UserPasswordTextbox.Text.Trim() != "") { SiteUser user = this.Login(UserNameTextbox.Text, UserPasswordTextbox.Text); if (user != null) { //loginModule = BaseObject.GetById<LoginModule>(this.ModuleID); //this.LoadModuleObject(); //ModuleNavigationAction drillDownAction = this.GetDrillDownActionByTagName("LoginButton"); ModuleNavigationActionLite navigationAction = GetNavigationActionByTagName("{LoginButton}"); switch (navigationAction.NavigationType) { case NavigationTypeEnum.NavigateToPage: Response.Redirect(navigationAction.NavigationUrl); break; case NavigationTypeEnum.ShowDetailsInModules: foreach (string drillDownModuleId in navigationAction.RefreshModules) { BaseModuleUserControl moduleControl = (BaseModuleUserControl)FindControlRecursive(this.Page.Master, "Mod" + drillDownModuleId.Replace("-", "")); if (moduleControl != null) { moduleControl.Reload(this); } } break; default: break; } UserNameTextbox.Text = ""; UserPasswordTextbox.Text = ""; this.Visible = false; } else { ResultLabel.Text = "Login mislukt."; } } else { ResultLabel.Text = "Login mislukt."; } }
protected void SelectItemLink_Click(Object sender, EventArgs args) { //LinkButton link = (LinkButton)sender; //Guid dataId; //Guid.TryParse(link.CommandArgument, out dataId); //this.LoadModuleObject(); //ModuleNavigationAction action = this.Module.GetNavigationActionByTagName("DrillDownLink"); ModuleNavigationActionLite action = GetNavigationActionByTagName("{DrillDownLink}"); if (action.NavigationType == NavigationTypeEnum.NavigateToPage) { //Response.Redirect(DrillDownPage.GetRewriteUrl()); Response.Redirect(action.NavigationUrl); } else if (action.NavigationType == NavigationTypeEnum.ShowDetailsInModules) { Guid dataId; //click van linkbutton wordt via javascript:__doPostback() gedaan //de link is dus geen echte linkbutton //dataid staat in eventArgument van deze postbackfunctie string eventArgument = Request.Params.Get("__EVENTARGUMENT"); Guid.TryParse(eventArgument, out dataId); LinkButton linkButton = (LinkButton)sender; foreach (string drillDownModuleId in action.RefreshModules) { BaseModuleUserControl moduleControl = (BaseModuleUserControl)FindControlRecursive(this.Page.Master, "Mod" + drillDownModuleId.Replace("-", "")); if (moduleControl != null) { moduleControl.Reload(this, new NavigationParameterObject() { Name = "dataItemID", GuidValue = dataId }); //{ //SelectAndShowData(dataId); } } string js = linkButton.OnClientClick; ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "navigation" + this.ModuleID.ToString("N"), js, true); } }
protected void DrillUpLink_Click(Object sender, EventArgs args) { ModuleNavigationActionLite action = GetNavigationActionByTagName("{DrillUpLink}"); if (action.NavigationType == NavigationTypeEnum.NavigateToPage) { Response.Redirect(action.NavigationUrl); } else if (action.NavigationType == NavigationTypeEnum.ShowDetailsInModules) { //click van linkbutton wordt via javascript:__doPostback() gedaan //de link is dus geen echte linkbutton //dataid staat in eventArgument van deze postbackfunctie Guid dataId; string eventArgument = Request.Params.Get("__EVENTARGUMENT"); Guid.TryParse(eventArgument, out dataId); LinkButton linkButton = (LinkButton)sender; foreach (string drillDownModuleId in action.RefreshModules) { BaseModuleUserControl moduleControl = (BaseModuleUserControl)FindControlRecursive(this.Page.Master, "Mod" + drillDownModuleId.Replace("-", "")); if (moduleControl != null) { moduleControl.Reload(this, new NavigationParameterObject() { Name = "dataid", GuidValue = dataId }); //{ //SelectAndShowData(dataId); } } //stuur eventueel javascript naar de browser zodat deze wordt uitgevoerd nadat pagina opnieuw is gerenderd string js = linkButton.OnClientClick; if (js != null && js != "") { ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "navigation" + this.ModuleID.ToString("N"), js, true); } } }
public override void Reload(BaseModuleUserControl sender, NavigationParameterObject args = null) { //Skippen deze module kan niets met een navigatie acties. }
protected void AppyFilter_Event(Object sender, EventArgs args) { string where = ""; string whereStatement; //string dropdownList = "", checkboxList = ""; //string foreach (Control control in this.GetAllControls(this.Page.Master)) { whereStatement = ""; if (control.ID != null) { string filterColumnID = Regex.Match(control.ID, "_(.*?)_").ToString().Replace("_", ""); DataField dataField = null; if (filterColumnID == "02f78e8cfc9c40ca9dd432eadc01f92a") //02f78e8c-fc9c-40ca-9dd4-32eadc01f92a = searchall ID { //SearchAllVelden. In deze velden wordt gezocht naar de invoer van de SearchAllTextbox filterColumnID = "ID, Name, Title"; } else { dataField = GetDataFieldByID(filterColumnID); } if (dataField != null) { whereStatement = GetFilterControlValue(control, dataField); if (whereStatement != "") { where += whereStatement; } } //Zoek in alle dataitem velden. if (dataField == null && filterColumnID != "" && control != null && control.GetType().Name == "TextBox") { TextBox textBox = (TextBox)control; string concatmappingField = " AND CONCAT(Name, Title"; foreach (DataField dataFieldToConcat in dataCollection.DataItemFields) { if (dataFieldToConcat.FieldType == FieldTypeEnum.Text || dataFieldToConcat.FieldType == FieldTypeEnum.LongText || dataFieldToConcat.FieldType == FieldTypeEnum.Html) { if (dataFieldToConcat.MappingColumn != "") { concatmappingField += ", " + dataFieldToConcat.MappingColumn; } } } concatmappingField += ")"; whereStatement += concatmappingField + " LIKE '%" + textBox.Text + "%'"; if (whereStatement != "" && textBox.Text.Trim() != "") { where += whereStatement; } } } } //if (where != "") where = where.Remove(where.Length - 4); //Antieke code //if (dropdownList != "") //{ // dropdownList = dropdownList.Remove(dropdownList.Length - 2); // dropdownList = " (FK_1 IN (" + dropdownList + ") OR " + // " FK_2 IN (" + dropdownList + ") OR " + // " FK_3 IN (" + dropdownList + ") OR " + // " FK_4 IN (" + dropdownList + ") OR " + // " FK_5 IN (" + dropdownList + ") OR " + // " FK_6 IN (" + dropdownList + ") OR " + // " FK_7 IN (" + dropdownList + ") OR " + // " FK_8 IN (" + dropdownList + ") OR " + // " FK_9 IN (" + dropdownList + ") OR " + // " FK_10 IN (" + dropdownList + ")) "; // where += " AND " + dropdownList; //} //if (checkboxList != "") //{ // checkboxList = checkboxList.Remove(checkboxList.Length - 2); // checkboxList = " EXISTS (SELECT * FROM datalookupvalueperitem WHERE FK_LookupValue IN (" + checkboxList + ") AND dataitem.ID = datalookupvalueperitem.FK_Item) "; // where += " AND " + checkboxList; //} ModuleNavigationActionLite action = GetNavigationActionByTagName("{ApplyFilter}"); if (action.NavigationType == NavigationTypeEnum.NavigateToPage) { Response.Redirect(action.NavigationUrl); } else if (action.NavigationType == NavigationTypeEnum.ShowDetailsInModules) { foreach (string drillDownModuleId in action.RefreshModules) { BaseModuleUserControl moduleControl = (BaseModuleUserControl)FindControlRecursive(this.Page.Master, "Mod" + drillDownModuleId.Replace("-", "")); if (moduleControl != null) { moduleControl.Reload(this, new NavigationParameterObject() { Name = "filter", StringValue = where, GuidValue = Guid.Empty }); //{ //SelectAndShowData(dataId); } } //stuur eventueel javascript naar de browser zodat deze wordt uitgevoerd nadat pagina opnieuw is gerenderd /* string js = linkButton.OnClientClick; * if (js != null && js != "") * { * ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "navigation" + this.ModuleID.ToString("N"), js, true); * } */ } }