protected void CloseWindow() { this.FieldList = new List <EmailTemplateFieldDTO>(); Session["FieldList"] = null; Session["FieldType"] = null; //reset fieldOption session value Session["FieldOptions"] = null; this.btnAddTemplate.Enable(); //form reset FormPanelFieldData.Reset(); //hide the form panel X.GetCmp <Ext.Net.Panel>("panelFieldData").Hidden = true; //set window height as form panel is hidden this.Window1.Height = 200; //reset radio group to select again //rdRadioGroup.Reset(); rdHidden.Checked = true; cbxFieldList.Hidden = true; ResetFieldList(); strFieldList.RemoveAll(); //hide save template button btnSaveTemplate.Hidden = true; btnSaveTemplate.Disable(); //reset window title Window1.Title = "Email Template"; }
public void DisableFieldDataForm() { int fieldListOffset = 0, saveTemplateOffset = 0; //form reset FormPanelFieldData.Reset(); //hide the form panel X.GetCmp <Ext.Net.Panel>("panelFieldData").Hidden = true; //reset radio group to select again/fieldList //rdRadioGroup.Reset(); rdHidden.Checked = true; ResetFieldList(); //reset fieldOption session value Session["FieldOptions"] = null; //get fieldList from session if exists if (Session["FieldList"] != null) { FieldList = (List <EmailTemplateFieldDTO>)Session["FieldList"]; if (FieldList.Count > 0) { btnSaveTemplate.Hidden = false; btnSaveTemplate.Enable(); cbxFieldList.Hidden = false; fieldListOffset = 15; saveTemplateOffset = 40; } else { btnSaveTemplate.Hidden = true; btnSaveTemplate.Disable(); cbxFieldList.Hidden = true; fieldListOffset = 0; saveTemplateOffset = 0; } } this.Window1.Height = 200 + fieldListOffset + saveTemplateOffset; }
protected void Select_RadioButton(object sender, DirectEventArgs e) { int optionListOffset = 0, saveTemplateOffset = 0; if (Session["FieldList"] != null) { FieldList = (List <EmailTemplateFieldDTO>)Session["FieldList"]; } //set field type FieldType = X.GetCmp <RadioGroup>("rdRadioGroup").CheckedItems[0].InputValue; this.FormPanelFieldData.Title = FieldType + " Field"; Session["FieldType"] = FieldType; pnlFieldOptions.Hidden = true; //set panel size if (FieldType == "Dropdown") { optionListOffset = 110; pnlFieldOptions.Hidden = false; } panelFieldData.Height = 265 + optionListOffset; //set the window size if/else count>0 if (FieldList.Count > 0) { saveTemplateOffset = 30; } this.Window1.Height = 455 + optionListOffset + saveTemplateOffset; this.Window1.X = 200; //show the form panel var panel = X.GetCmp <Ext.Net.Panel>("panelFieldData"); panel.Hidden = false; //reset form FormPanelFieldData.Reset(); }
protected void EnableFieldDataForm(bool isNewField) { // reset field option data Session["FieldOptions"] = null; cbxFieldOptions.Reset(); strFieldOptions.RemoveAll(); //show the field data panel var panel = X.GetCmp <Ext.Net.Panel>("panelFieldData"); panel.Hidden = false; //set field type if (isNewField) { FieldType = X.GetCmp <RadioGroup>("rdRadioGroup").CheckedItems[0].InputValue; this.FormPanelFieldData.Title = "New " + FieldType + " Field"; } //Update field type Session["FieldType"] = FieldType; //reset existing field cbox on select new element/vice-versa if (isNewField) { ResetFieldList(); } else { rdHidden.Checked = true; } //set panel size int optionListOffset = 0, saveTemplateOffset = 0, fieldListOffset = 0; pnlFieldOptions.Hidden = true; if (FieldType == "Dropdown") { optionListOffset = 65; pnlFieldOptions.Hidden = false; } panelFieldData.Height = 280 + optionListOffset; //set the window size if/else count>0 if (Session["FieldList"] != null) { FieldList = (List <EmailTemplateFieldDTO>)Session["FieldList"]; } if (FieldList.Count > 0) { saveTemplateOffset = 30; fieldListOffset = 40; } this.Window1.Height = 470 + optionListOffset + saveTemplateOffset + fieldListOffset; //reset form FormPanelFieldData.Reset(); this.Window1.X = 200; var vv = Session["SelectedFieldValue"]; }