Ejemplo n.º 1
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     FormParent = Parent as QubeCRUDForm;
 }
Ejemplo n.º 2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            FormParent = Parent as QubeCRUDForm;

            btnNew.Text = FormParent.NewButtonText;
            btnUpdate.Text = FormParent.UpdateButtonText;
            btnDelete.Text = FormParent.DeleteButtonText;
            btnCancel.Text = FormParent.CancelButtonText;

            Controls.Add(new Panel() { CssClass = "clear" });

            if (Types.HasFlag(EPanelType.Read) && FormParent.AllowInserting)
                Controls.Add(btnNew);

            if (Types.HasFlag(EPanelType.Create) || Types.HasFlag(EPanelType.Update))
                Controls.Add(btnUpdate);

            if (Types.HasFlag(EPanelType.Delete))
                Controls.Add(btnDelete);

            if(!Types.HasFlag(EPanelType.Read))
                Controls.Add(btnCancel);
        }