protected void Page_Load(object sender, System.EventArgs e) { _OrderStatusId = AlwaysConvert.ToInt(Request.QueryString["OrderStatusId"]); _OrderStatus = OrderStatusDataSource.Load(_OrderStatusId); AbleCommerce.Code.PageHelper.ConvertEnterToTab(Name); AbleCommerce.Code.PageHelper.ConvertEnterToTab(DisplayName); Caption.Text = string.Format(Caption.Text, _OrderStatus.Name); if (!Page.IsPostBack) { // LOAD TRIGGERS SELECT BOX foreach (int storeEventId in Enum.GetValues(typeof(StoreEvent))) { if ((storeEventId >= 100) && (storeEventId < 200)) { StoreEvent storeEvent = (StoreEvent)storeEventId; Triggers.Items.Add(new ListItem(StringHelper.SpaceName(storeEvent.ToString()), storeEventId.ToString())); } } // INITIALIZE FORM Name.Text = _OrderStatus.Name; Name.Focus(); DisplayName.Text = _OrderStatus.DisplayName; Report.Checked = _OrderStatus.IsActive; Cancelled.Checked = !_OrderStatus.IsValid; InventoryAction.SelectedIndex = (int)_OrderStatus.InventoryActionId; foreach (OrderStatusTrigger trigger in _OrderStatus.Triggers) { ListItem item = Triggers.Items.FindByValue(trigger.StoreEventId.ToString()); if (item != null) { item.Selected = true; } } } }
protected void Page_Load(object sender, System.EventArgs e) { AbleCommerce.Code.PageHelper.ConvertEnterToTab(Name); AbleCommerce.Code.PageHelper.ConvertEnterToTab(DisplayName); if (!Page.IsPostBack) { // LOAD TRIGGERS SELECT BOX foreach (int storeEventId in Enum.GetValues(typeof(StoreEvent))) { if ((storeEventId >= 100) && (storeEventId < 200)) { StoreEvent storeEvent = (StoreEvent)storeEventId; Triggers.Items.Add(new ListItem(StringHelper.SpaceName(storeEvent.ToString()), storeEventId.ToString())); } } } }