コード例 #1
0
 public override Lazaro.Pres.Forms.FormActionCollection GetFormActions()
 {
     Lazaro.Pres.Forms.FormActionCollection Res = base.GetFormActions();
     Res.Add(new Lazaro.Pres.Forms.FormAction("Guardar", "F4", "guardar", 20, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     Res.Add(new Lazaro.Pres.Forms.FormAction("Cargar", "F5", "cargar", 10, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     return(Res);
 }
コード例 #2
0
 public FormularioEdicion()
 {
     this.DisplayStyle = Lazaro.Pres.DisplayStyles.Template.Current.EditForm;
     InitializeComponent();
     this.FormActions = new Lazaro.Pres.Forms.FormActionCollection()
     {
         new Lazaro.Pres.Forms.FormAction("Cancelar", "Esc", "cancelar", 20),
         new Lazaro.Pres.Forms.FormAction("Guardar", "F9", "aceptar", 10),
         new Lazaro.Pres.Forms.FormAction("Imprimir", "F8", "imprimir", 30, Lazaro.Pres.Forms.FormActionVisibility.Hidden),
         new Lazaro.Pres.Forms.FormAction("Comentarios", null, "comentarios", 30, Lazaro.Pres.Forms.FormActionVisibility.Tertiary),
         new Lazaro.Pres.Forms.FormAction("Historial", null, "historial", 20, Lazaro.Pres.Forms.FormActionVisibility.Tertiary),
         new Lazaro.Pres.Forms.FormAction("Más datos", null, "panelextendido", 10, Lazaro.Pres.Forms.FormActionVisibility.Hidden)
     };
     this.ActualizarFormActions();
     if (Screen.PrimaryScreen.Bounds.Width <= 1024)
     {
         // Más ajustado en pantallas más pequeñas
         this.PanelEdicion.Padding = new System.Windows.Forms.Padding(12, 12, 8, 8);
         this.PanelExtendido.Width = 320;
     }
     else
     {
         this.PanelEdicion.Padding = new System.Windows.Forms.Padding(24, 24, 16, 16);
         this.PanelExtendido.Width = 360;
     }
 }
コード例 #3
0
ファイル: Editar.cs プロジェクト: njmube/lazaro
 public override Lazaro.Pres.Forms.FormActionCollection GetFormActions()
 {
     Lazaro.Pres.Forms.FormActionCollection Res = base.GetFormActions();
     Res.Add(new Lazaro.Pres.Forms.FormAction("Observaciones", "F7", "obs", 20, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     Res.Add(new Lazaro.Pres.Forms.FormAction("Más datos", "F5", "masdatos", 10, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     Res.Add(new Lazaro.Pres.Forms.FormAction("Convertir", "F4", "convertir", 50, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     return(Res);
 }
コード例 #4
0
 public override Lazaro.Pres.Forms.FormActionCollection GetFormActions()
 {
     Lazaro.Pres.Forms.FormActionCollection Res = base.GetFormActions();
     if (this.PuedeEditarPago)
     {
         Res.Add(new Lazaro.Pres.Forms.FormAction("Pago", "F2", "pago", 10, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     }
     return(Res);
 }
コード例 #5
0
ファイル: Editar.cs プロジェクト: LeoIlla777/Gestion777
 public override Lazaro.Pres.Forms.FormActionCollection GetFormActions()
 {
     Lazaro.Pres.Forms.FormActionCollection Res = base.GetFormActions();
     if (this.Elemento != null && Lbl.Sys.Config.Actual.UsuarioConectado.TienePermiso(this.Elemento, Lbl.Sys.Permisos.Operaciones.Administrar) && (EntradaTipo.ValueInt & 4) == 4)
     {
         Res.Add(new Lazaro.Pres.Forms.FormAction("Permisos", "F2", "permisos", 10, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     }
     return(Res);
 }
コード例 #6
0
ファイル: Editar.cs プロジェクト: solutema/ultralight
 public override Lazaro.Pres.Forms.FormActionCollection GetFormActions()
 {
     Lazaro.Pres.Forms.FormActionCollection Res = base.GetFormActions();
     Res.Add(new Lazaro.Pres.Forms.FormAction("Facturar", "F4", "facturar", 10, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     Res.Add(new Lazaro.Pres.Forms.FormAction("Artículos", "F5", "articulos", 20, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     Res.Add(new Lazaro.Pres.Forms.FormAction("Novedad", "F6", "novedad", 30, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     Res.Add(new Lazaro.Pres.Forms.FormAction("Presupuesto", "F7", "presupuesto", 40, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     return(Res);
 }
コード例 #7
0
 public override Lazaro.Pres.Forms.FormActionCollection GetFormActions()
 {
     Lazaro.Pres.Forms.FormActionCollection Res = base.GetFormActions();
     if (this.Elemento != null && this.Elemento.Existe)
     {
         Res.Add(new Lazaro.Pres.Forms.FormAction("Movimientos", "F7", "movimientos", 20, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
         Res.Add(new Lazaro.Pres.Forms.FormAction("Conformación", "F5", "conformacion", 10, Lazaro.Pres.Forms.FormActionVisibility.Secondary));
     }
     return(Res);
 }
コード例 #8
0
        public virtual Lazaro.Pres.Forms.FormActionCollection GetFormActions()
        {
            if (m_FormActions == null)
            {
                m_FormActions = new Lazaro.Pres.Forms.FormActionCollection();
                // Obtengo una lista de acciones basadas en la tabla sys_tags
                if (this.ElementoTipo != null && Lfx.Data.DatabaseCache.DefaultCache.Tables.ContainsKey("sys_tags"))
                {
                    Lbl.Atributos.Datos AttrDatos = this.ElementoTipo.GetAttribute <Lbl.Atributos.Datos>();
                    if (AttrDatos != null)
                    {
                        string NombreTabla = AttrDatos.TablaDatos;

                        var Conn = this.Connection;
                        if (Conn == null)
                        {
                            Conn = Lfx.Workspace.Master.MasterConnection;
                        }
                        System.Data.DataTable TagsTable = Conn.Select("SELECT * FROM sys_tags WHERE fieldtype IN ('action') AND tablename='" + NombreTabla + "'");
                        foreach (System.Data.DataRow TagRow in TagsTable.Rows)
                        {
                            Lfx.Data.Row ActionRow = (Lfx.Data.Row)TagRow;
                            Lazaro.Pres.Forms.FormAction NewAction = new Lazaro.Pres.Forms.FormAction(ActionRow.Fields["label"].ValueString, null, ActionRow.Fields["label"].ValueString, 0);
                            switch (ActionRow.Fields["inputtype"].ValueString)
                            {
                            case "primary":
                            case "pri":
                                NewAction.Visibility = Lazaro.Pres.Forms.FormActionVisibility.Main;
                                break;

                            case "tertiary":
                            case "ter":
                                NewAction.Visibility = Lazaro.Pres.Forms.FormActionVisibility.Tertiary;
                                break;

                            case "secondary":
                            case "sec":
                            default:
                                NewAction.Visibility = Lazaro.Pres.Forms.FormActionVisibility.Secondary;
                                break;
                            }
                            NewAction.Extra = ActionRow.Fields["extra"].ValueString;


                            m_FormActions.Add(NewAction);
                        }
                    }
                }
            }

            return(m_FormActions.ShallowClone());
        }
コード例 #9
0
 public void AddAndUpdate(Lazaro.Pres.Forms.FormActionCollection actions)
 {
     foreach (Lazaro.Pres.Forms.FormAction act in actions)
     {
         if (this.ContainsKey(act.Name))
         {
             this[act.Name] = act;
         }
         else
         {
             this.Add(act);
         }
     }
 }
コード例 #10
0
        private void ActualizarFormActions()
        {
            Lazaro.Pres.Forms.FormActionCollection CombinedFormActions = new Lazaro.Pres.Forms.FormActionCollection();

            CombinedFormActions.AddRange(this.FormActions);
            if (m_ControlUnico != null)
            {
                CombinedFormActions.AddAndUpdate(m_ControlUnico.GetFormActions());
            }

            this.PanelAccionesPrimariasYSecundarias.FormActions = CombinedFormActions;
            this.PanelAccionesTerciarias.FormActions            = CombinedFormActions;
            this.PanelAccionesPrimariasYSecundarias.ActualizarControl();
            this.PanelAccionesTerciarias.ActualizarControl();
        }
コード例 #11
0
 public FormularioEdicion()
 {
         this.DisplayStyle = Lazaro.Pres.DisplayStyles.Template.Current.EditForm;
         InitializeComponent();
         this.FormActions = new Lazaro.Pres.Forms.FormActionCollection()
         {
                 new Lazaro.Pres.Forms.FormAction("Cancelar", "Esc", "cancelar", 20),
                 new Lazaro.Pres.Forms.FormAction("Guardar", "F9", "aceptar", 10),
                 new Lazaro.Pres.Forms.FormAction("Imprimir", "F8", "imprimir", 30, Lazaro.Pres.Forms.FormActionVisibility.Hidden),
                 new Lazaro.Pres.Forms.FormAction("Comentarios", null, "comentarios", 30, Lazaro.Pres.Forms.FormActionVisibility.Tertiary),
                 new Lazaro.Pres.Forms.FormAction("Historial", null, "historial", 20, Lazaro.Pres.Forms.FormActionVisibility.Tertiary),
                 new Lazaro.Pres.Forms.FormAction("Más datos", null, "panelextendido", 10, Lazaro.Pres.Forms.FormActionVisibility.Hidden)
         };
         this.ActualizarFormActions();
         if(Screen.PrimaryScreen.Bounds.Width <= 1024) {
                 // Más ajustado en pantallas más pequeñas
                 this.PanelEdicion.Padding = new System.Windows.Forms.Padding(12, 12, 8, 8);
                 this.PanelExtendido.Width = 320;
         } else {
                 this.PanelEdicion.Padding = new System.Windows.Forms.Padding(24, 24, 16, 16);
                 this.PanelExtendido.Width = 360;
         }
 }
コード例 #12
0
ファイル: ControlEdicion.cs プロジェクト: solutema/ultralight
                public virtual Lazaro.Pres.Forms.FormActionCollection GetFormActions()
                {
                        if (m_FormActions == null) {
                                m_FormActions = new Lazaro.Pres.Forms.FormActionCollection();
                                // Obtengo una lista de acciones basadas en la tabla sys_tags
                                if (this.ElementoTipo != null && Lfx.Data.DataBaseCache.DefaultCache.Tables.ContainsKey("sys_tags")) {
                                        Lbl.Atributos.Datos AttrDatos = this.ElementoTipo.GetAttribute<Lbl.Atributos.Datos>();
                                        if (AttrDatos != null) {
                                                string NombreTabla = AttrDatos.TablaDatos;

                                                System.Data.DataTable TagsTable = Lfx.Workspace.Master.MasterConnection.Select("SELECT * FROM sys_tags WHERE fieldtype IN ('action') AND tablename='" + NombreTabla + "'");
                                                foreach (System.Data.DataRow TagRow in TagsTable.Rows) {
                                                        Lfx.Data.Row ActionRow = (Lfx.Data.Row)TagRow;
                                                        Lazaro.Pres.Forms.FormAction NewAction = new Lazaro.Pres.Forms.FormAction(ActionRow.Fields["label"].ValueString, null, ActionRow.Fields["label"].ValueString, 0);
                                                        switch(ActionRow.Fields["inputtype"].ValueString) {
                                                                case "primary":
                                                                case "pri":
                                                                        NewAction.Visibility = Lazaro.Pres.Forms.FormActionVisibility.Main;
                                                                        break;
                                                                case "tertiary":
                                                                case "ter":
                                                                        NewAction.Visibility = Lazaro.Pres.Forms.FormActionVisibility.Tertiary;
                                                                        break;
                                                                case "secondary":
                                                                case "sec":
                                                                default:
                                                                        NewAction.Visibility = Lazaro.Pres.Forms.FormActionVisibility.Secondary;
                                                                        break;

                                                        }
                                                        NewAction.Extra = ActionRow.Fields["extra"].ValueString;
                                                

                                                        m_FormActions.Add(NewAction);
                                                }
                                        }
                                }
                        }

                        return m_FormActions.ShallowClone();
                }
コード例 #13
0
                private void ActualizarFormActions()
                {
                        Lazaro.Pres.Forms.FormActionCollection CombinedFormActions = new Lazaro.Pres.Forms.FormActionCollection();

                        CombinedFormActions.AddRange(this.FormActions);
                        if (m_ControlUnico != null)
                                CombinedFormActions.AddAndUpdate(m_ControlUnico.GetFormActions());

                        this.PanelAccionesPrimariasYSecundarias.FormActions = CombinedFormActions;
                        this.PanelAccionesTerciarias.FormActions = CombinedFormActions;
                        this.PanelAccionesPrimariasYSecundarias.ActualizarControl();
                        this.PanelAccionesTerciarias.ActualizarControl();
                }