protected void Page_Load(object sender, EventArgs e) { using (ScrudForm scrud = new ScrudForm()) { scrud.DenyAdd = !SessionHelper.IsAdmin(); scrud.DenyEdit = !SessionHelper.IsAdmin(); scrud.DenyDelete = !SessionHelper.IsAdmin(); scrud.KeyColumn = "user_id"; scrud.TableSchema = "policy"; scrud.Table = "auto_verification_policy"; scrud.ViewSchema = "policy"; scrud.View = "auto_verification_policy_view"; scrud.PageSize = 100; scrud.Width = 2000; scrud.DisplayFields = GetDisplayFields(); scrud.DisplayViews = GetDisplayViews(); scrud.Text = Titles.AutoVerificationPolicy; this.ScrudPlaceholder.Controls.Add(scrud); } }
private void LoadValuesFromSession() { if (this.Session["Product"] == null) { return; } this.model = this.Session["Product"] as MergeModel; if (this.model == null) { return; } this.PartyCodeHidden.Value = this.model.PartyCode.ToString(LocalizationHelper.GetCurrentCulture()); this.PartyCodeTextBox.Text = this.model.PartyCode.ToString(LocalizationHelper.GetCurrentCulture()); this.PriceTypeIdHidden.Value = this.model.PriceTypeId.ToString(SessionHelper.GetCulture()); this.ReferenceNumberTextBox.Text = this.model.ReferenceNumber; this.StatementReferenceTextBox.Text = this.model.StatementReference; this.Session[this.ID] = this.model.View; this.Session["TranIdCollection"] = this.model.TransactionIdCollection; this.ClearSession("Product"); }