public static EditUserController OpenCreate() { var result = new EditUserController(); result.Model = new User(); result.Window = new EditorWindow(); //result.Window.EditTitle = "Create New User"; result.Window.Mode = DynamicEditorModes.Edit; result.Window.CanChangeMode = false; createFields(result.Window, result.Model); result.mapEvents(); return(result); }
public static EditUserController openModify(User Model, bool AutomaticallyClose) { var result = new EditUserController(); result.Model = Model; result.Window = new EditorWindow(); //result.Window.EditTitle = "Edit User ID " + Model.ID.ToString(); //result.Window.ViewTitle = "View User ID " + Model.ID.ToString(); result.Window.Mode = DynamicEditorModes.Edit; result.Window.CanChangeMode = !AutomaticallyClose; createFields(result.Window, result.Model); result.mapEvents(); return(result); }
public static EditUserController OpenView(User Model, bool AllowEditing) { var result = new EditUserController(); result.Model = Model; result.Window = new EditorWindow(); //result.Window.EditTitle = "Edit User ID " + Model.ID.ToString(); //result.Window.ViewTitle = "View User ID " + Model.ID.ToString(); result.Window.Mode = DynamicEditorModes.View; result.Window.CanChangeMode = AllowEditing; createFields(result.Window, result.Model); result.mapEvents(); return(result); }
private void Window_NewRow(object sender, EventArgs e) { var manager = EditUserController.OpenCreate(); manager.Show(this.Window); }