protected void ContractsCheckBoxList_PreRender(object sender, EventArgs e) { List<LanguageEntity> list = new LanguageMapper().ListForAmandmentTemplate(Convert.ToInt32(Request.QueryString["AmandamentTemplateId"])); foreach (LanguageEntity ent in list) { ContractsCheckBoxList.Items.FindByValue(ent.Id.ToString()).Selected = true; } }
protected void Page_Load(object sender, EventArgs e) { Stack<string> stack = (Stack<string>)Session["BackStack"]; if (!stack.Contains(Request.Url.PathAndQuery)) { stack.Push(Request.Url.PathAndQuery.ToString()); } Session["BackStack"] = stack; if (Session["ContractTemplatePreData"] == null || Request.QueryString["LanguageId"] == null) { Session.Remove("ContractTemplatePreData"); Response.Redirect("List.aspx"); } if (!IsPostBack) { if (Request.QueryString["ContractTemplateId"] != null) { ContractTemplateEntity ent = new ContractTemplateMapper().Get(Convert.ToInt32(Request.QueryString["ContractTemplateId"])); ContractTemplateTitleBox.Text = ent.Title; ContractPreffixTextBox.Text = ent.Preffix; } } LanguageEntity lang = new LanguageMapper().Get(Convert.ToInt32(Request.QueryString["LanguageId"])); LanguageLabel.Text = lang.Title; string s = CKEditor1.Text; if (!IsPostBack) { CKEditor1.config.toolbar = new object[] { new object[] { "Save", "NewPage", "Preview"}, new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker"}, new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll"}, "/", new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" }, new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote"}, new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" }, new object[] { "BidiLtr", "BidiRtl" }, new object[] { "Image", "Table", "HorizontalRule", "SpecialChar", "PageBreak"}, "/", new object[] { "Styles", "Format", "Font", "FontSize" }, new object[] { "TextColor", "BGColor" }, new object[] { "Maximize", "ShowBlocks"} }; } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["LanguageId"] != null) { if (!IsPostBack) { LanguageEntity entity = new LanguageMapper().Get(Convert.ToInt32(Request.QueryString["LanguageId"])); if (entity != null) { TitleTextBox.Text = entity.Title; OtherInfoTextBox.Text = entity.Description; } else { Response.Redirect("List.aspx"); } } } else { Response.Redirect("List.aspx"); } }
private void Generate() { List<LanguageEntity> langs = new LanguageMapper().ListForContractTemplate(Convert.ToInt32(Request.QueryString["ContractTemplateId"])); foreach (LanguageEntity ent in langs) { ContractTemplateEntity cte = new ContractTemplateMapper().GetContentById(Convert.ToInt32(Request.QueryString["ContractTemplateId"]), ent.Id); GenerateContractVersions(ent.Title, cte); } GenerateButtons(); }