protected void WrapStylesGrid_RowEditing(object sender, GridViewEditEventArgs e) { int wrapStyleId = (int)WrapStylesGrid.DataKeys[e.NewEditIndex].Value; WrapStyle style = WrapStyleDataSource.Load(wrapStyleId); if (style != null) { AddPanel.Visible = false; EditPanel.Visible = true; EditCaption.Text = string.Format(EditCaption.Text, style.Name); EditWrapStyleDialog editDialog = EditPanel.FindControl("EditWrapStyleDialog1") as EditWrapStyleDialog; if (editDialog != null) { editDialog.WrapStyleId = wrapStyleId; } } }
protected void GroupGrid_RowEditing(object sender, GridViewEditEventArgs e) { int groupId = (int)GroupGrid.DataKeys[e.NewEditIndex].Value; CommerceBuilder.Users.Group group = GroupDataSource.Load(groupId); if (group != null) { AddPanel.Visible = false; EditPanel.Visible = true; EditCaption.Text = string.Format(EditCaption.Text, group.Name); EditGroupDialog editDialog = EditPanel.FindControl("EditGroupDialog1") as EditGroupDialog; if (editDialog != null) { editDialog.GroupId = groupId; } AddEditAjax.Update(); } }
protected void PaymentMethodGrid_RowEditing(object sender, GridViewEditEventArgs e) { int paymentMethodId = (int)PaymentMethodGrid.DataKeys[e.NewEditIndex].Value; PaymentMethod paymentMethod = PaymentMethodDataSource.Load(paymentMethodId); if (paymentMethod != null) { AddPanel.Visible = false; EditPanel.Visible = true; EditCaption.Text = string.Format(EditCaption.Text, paymentMethod.Name); AbleCommerce.Admin.Payment.EditPaymentMethodDialog editDialog = EditPanel.FindControl("EditPaymentMethodDialog1") as AbleCommerce.Admin.Payment.EditPaymentMethodDialog; if (editDialog != null) { editDialog.LoadDialog(paymentMethodId); } UpdatePanel1.Update(); } }
protected void LanguagesGrid_RowEditing(object sender, GridViewEditEventArgs e) { int languageId = (int)LanguagesGrid.DataKeys[e.NewEditIndex].Value; Language language = LanguageDataSource.Load(languageId); if (language != null) { AddPanel.Visible = false; EditPanel.Visible = true; EditCaption.Text = string.Format(EditCaption.Text, language.Name); EditLanguageDialog editDialog = EditPanel.FindControl("EditLanguageDialog1") as EditLanguageDialog; if (editDialog != null) { editDialog.LanguageId = languageId; } AddEditAjax.Update(); } }