protected void Page_Load(object sender, EventArgs e) { TransitAccountPropertyValue tppv = SessionManager.GetInstance <TransitAccountPropertyValue, int, string, string>( AccountId, GroupName, PropertyName, SessionManager.AccountService.GetAccountPropertyValueByName); labelValue.Text = RenderEx(tppv.Value); }
public void save_Click(object sender, EventArgs e) { foreach (DataGridItem item in gridManage.Items) { switch (item.ItemType) { case ListItemType.Item: case ListItemType.AlternatingItem: case ListItemType.SelectedItem: int id = int.Parse(((HiddenField)item.FindControl("Id")).Value); int property_id = int.Parse(((HiddenField)item.FindControl("propertyId")).Value); string propertytypename = ((HiddenField)item.FindControl("propertyTypeName")).Value; TransitAccountPropertyValue value = new TransitAccountPropertyValue(); value.Id = id; value.AccountId = SessionManager.Account.Id; value.AccountPropertyId = property_id; switch (propertytypename) { case "System.Array": value.Value = StringToArray(((TextBox)item.FindControl("array_value")).Text); break; case "System.Text.StringBuilder": value.Value = ((TextBox)item.FindControl("text_value")).Text; break; case "System.String": value.Value = ((TextBox)item.FindControl("string_value")).Text; break; case "System.Int32": value.Value = ((TextBox)item.FindControl("int_value")).Text; break; case "System.Boolean": value.Value = ((CheckBox)item.FindControl("bool_value")).Checked.ToString(); break; } value.Id = SessionManager.CreateOrUpdate <TransitAccountPropertyValue>( value, SessionManager.AccountService.CreateOrUpdateAccountPropertyValue); break; } } Redirect(linkBack.NavigateUrl); }
public void save_Click(object sender, EventArgs e) { foreach (DataGridItem item in gridManage.Items) { switch (item.ItemType) { case ListItemType.Item: case ListItemType.AlternatingItem: case ListItemType.SelectedItem: int id = int.Parse(((HiddenField)item.FindControl("Id")).Value); int property_id = int.Parse(((HiddenField)item.FindControl("propertyId")).Value); string propertytypename = ((HiddenField)item.FindControl("propertyTypeName")).Value; TransitAccountPropertyValue value = new TransitAccountPropertyValue(); value.Id = id; value.AccountId = SessionManager.Account.Id; value.AccountPropertyId = property_id; switch (propertytypename) { case "System.Array": value.Value = StringToArray(((TextBox)item.FindControl("array_value")).Text); break; case "System.Text.StringBuilder": value.Value = ((TextBox)item.FindControl("text_value")).Text; break; case "System.String": value.Value = ((TextBox)item.FindControl("string_value")).Text; break; case "System.Int32": value.Value = ((TextBox)item.FindControl("int_value")).Text; break; case "System.Boolean": value.Value = ((CheckBox)item.FindControl("bool_value")).Checked.ToString(); break; } value.Id = SessionManager.CreateOrUpdate<TransitAccountPropertyValue>( value, SessionManager.AccountService.CreateOrUpdateAccountPropertyValue); break; } } Redirect(linkBack.NavigateUrl); }
public int CreateOrUpdateAccountPropertyValue(string ticket, TransitAccountPropertyValue propertyvalue) { return WebServiceImpl<TransitAccountPropertyValue, ManagedAccountPropertyValue, AccountPropertyValue>.CreateOrUpdate( ticket, propertyvalue); }