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; TranIdCollectionHiddenField.Value = string.Join(",", this.model.TransactionIdCollection); this.ClearSession("Product"); }
public override void OnControlLoad(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_scrud_view"; scrud.PageSize = 100; scrud.DisplayFields = GetDisplayFields(); scrud.DisplayViews = GetDisplayViews(); scrud.Text = Titles.AutoVerificationPolicy; scrud.ResourceAssembly = Assembly.GetAssembly(typeof(AutoVerification)); this.ScrudPlaceholder.Controls.Add(scrud); } base.OnControlLoad(sender, e); }
public Collection <ListItem> GetAccounts() { if (Switches.AllowParentAccountInGlTransaction()) { if (SessionHelper.IsAdmin()) { using (DataTable table = Accounts.GetAccounts()) { return(GetValues(table)); } } using (DataTable table = Accounts.GetNonConfidentialAccounts()) { return(GetValues(table)); } } if (SessionHelper.IsAdmin()) { using (DataTable table = Accounts.GetChildAccounts()) { return(GetValues(table)); } } using (DataTable table = Accounts.GetNonConfidentialChildAccounts()) { return(GetValues(table)); } }
public Collection <ListItem> GetCashRepositories() { Collection <ListItem> values = new Collection <ListItem>(); int officeId = SessionHelper.GetOfficeId(); using (DataTable table = CashRepositories.GetCashRepositoryDataTable(officeId)) { string displayField = ConfigurationHelper.GetDbParameter("CashRepositoryDisplayField"); table.Columns.Add("cash_repository", typeof(string), displayField); foreach (DataRow dr in table.Rows) { values.Add(new ListItem(dr["cash_repository"].ToString(), dr["cash_repository_id"].ToString())); } } return(values); }
public static string GetRole() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("Role"))); }
public static string GetRegistrationNumber() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("RegistrationNumber"))); }
public static DateTime GetRegistrationDate() { return(Conversion.TryCastDate(SessionHelper.GetSessionKey("RegistrationDate"))); }
public static string GetOfficeName() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("OfficeName"))); }
public static string GetZipCode() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("ZipCode"))); }
public static int GetOfficeId() { return(Conversion.TryCastInteger(SessionHelper.GetSessionKey("OfficeId"))); }
public static string GetNickname() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("NickName"))); }
public static long GetLogOnId() { return(Conversion.TryCastLong(SessionHelper.GetSessionKey("LogOnId"))); }
public static string GetFax() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("Fax"))); }
public static string GetEmail() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("Email"))); }
public static string GetCountry() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("Country"))); }
public static bool IsSystem() { return(Conversion.TryCastBoolean(SessionHelper.GetSessionKey("IsSystem"))); }
public static string GetBaseCurrency() { return(Conversion.TryCastString(SessionHelper.GetSessionKey("CurrencyCode"))); }
public static DateTime GetSignInTimestamp() { return(Conversion.TryCastDate(SessionHelper.GetSessionKey("SignInTimestamp"))); }