private void Page_Load(object sender, System.EventArgs e) { if (!this.IsPostBack) { this.hapb.Value = this.AutoPostBack.ToString(); this.tbm.Attributes.Add("onclick", "SHMulSel(" + ControlClientID + ", event)"); if (typev == null) { this.divMain.Attributes["class"] = "DVMain_" + type; } else { this.divMain.Attributes["class"] = "DVMain_" + typev; } this.dvTop.Attributes["class"] = "DT_" + type; this.tbm.Attributes["class"] = "MSTBM_" + type; } if (this.hapb.Value == "True") { //Register __doPostBack method string key = "funcDoPostBack"; string script = "<script language=javascript type='text/javascript'>function __doPostBack1(eventTarget, eventArgument) { " + "var theform; " + "if (window.navigator.appName.toLowerCase().indexOf('netscape') > -1) " + "{ theform = document.forms['Form1']; } "+ "else " + "{ theform = document.Form1; } " + "theform." + this.ClientID + "_" + "__ET1.value = eventTarget.split('$').join(':'); " + "theform." + this.ClientID + "_" + "__EA1.value = eventArgument; " + "theform.submit(); }</script>"; if (CallingPage != null) { CallingPage.RegisterClientScriptBlock(key, script); } else { this.Page.RegisterClientScriptBlock(key, script); } } //Handle __doPostBack post back event. if (this.hapb.Value == "True" && __ET1 != null && __EA1 != null) // && __EA1.Value != string.Empty) { if (__ET1.Value.Equals("MultiSelectDropDown")) { if (this.OnItemsSelected == null) { return; } MultiSelectDropDownItemSelectedEventArgs args = new MultiSelectDropDownItemSelectedEventArgs(); args.SelectedOptionText = __EA1.Value; this.tbm.Text = __EA1.Value; args.SelectedOptionValueText = hsiv.Value; args.SelectedOptionList = GetSelectedOptionListFromText(args.SelectedOptionText); this.OnItemsSelected(this, args); } } }
public override bool Equals(object obj) { if (!(obj is Link src)) { return(false); } return(CallingPage.Equals(src.CallingPage) && string.Equals(Href, src.Href, StringComparison.OrdinalIgnoreCase)); }
public async void SaveInspectionClicked(object sender, EventArgs e) { ChecklistModel checklist = inspection.Checklist; //inspection.Name = NameCell.Text; inspection.ChecklistId = checklist.Id; if (!checklist.Inspections.Contains(inspection)) { checklist.Inspections.Add(inspection); } //if (inspectorPicker.SelectedIndex >= 0) //{ inspection.inspectors = selectedInspectors; inspection.inspectors.Remove(Inspector.Null); //inspection.inspectors.Add(inspectorPicker.SelectedItem); //} App.database.SaveInspection(inspection); CallingPage.ResetInspections(); await App.Navigation.PopAsync(true); }
public override int GetHashCode() => Utils.CombineHashCodes(CallingPage.GetHashCode(), Href.GetHashCode());