Example #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);
 }
Example #2
0
 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);
 }
Example #3
0
 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);
 }
Example #4
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);
 }
Example #5
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);
 }
Example #6
0
 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);
 }
Example #7
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());
        }
Example #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;

                                                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();
                }