protected virtual void List_Action(object sender, CommonGridViewActionEventArgs e) { if (e == null) { return; } switch (e.Action) { case CommandActions.Add: List.Visible = false; EditForm.Visible = true; EditForm.ChangeMode(DetailsViewMode.Insert); m_AddBreadcrumbs = true; break; case CommandActions.Edit: List.SelectedIndex = e.RowIndex; List.Visible = false; EditForm.Visible = true; EditForm.ChangeMode(DetailsViewMode.Edit); m_AddBreadcrumbs = true; break; case CommandActions.Delete: EditFormReset(); break; } }
protected void UserDetailMenu_ItemClick(object sender, CommandEventArgs e) { if (e == null) { return; } Micajah.Common.Bll.Action action = e.CommandArgument as Micajah.Common.Bll.Action; if (action == null) { return; } if (action.ActionId == ActionProvider.UserNameAndEmailPageActionId) { UserDetailMenu.Visible = false; EditForm.Visible = true; EditForm_ShowDetails(true); EditForm.Fields[19].Visible = false; EditForm.ChangeMode(DetailsViewMode.Edit); EditForm.DataBind(); this.AddBreadCrumbs(action, EditForm); } else if (action.ActionId == ActionProvider.UserPasswordPageActionId) { UserDetailMenu.Visible = false; PasswordForm.Visible = true; PasswordForm.LoginId = this.SelectedUserId; this.AddBreadCrumbs(action, PasswordForm.EditForm); } else if (action.ActionId == ActionProvider.UserGroupsPageActionId) { UserDetailMenu.Visible = false; EditUserGroupsForm.Visible = true; EditUserGroupsForm.ChangeMode(DetailsViewMode.Edit); EditUserGroupsForm.DataBind(); this.AddBreadCrumbs(action, EditUserGroupsForm); } else if (action.ActionId == ActionProvider.UserActivateInactivatePageActionId) { UserDetailMenu.Visible = false; EditUserActiveForm.Visible = true; EditUserActiveForm.ChangeMode(DetailsViewMode.Edit); EditUserActiveForm.DataBind(); this.AddBreadCrumbs(action, EditUserActiveForm); } }