Esempio n. 1
0
        public PUsuario()
        {
            InitializeComponent();
            Screen screen = Screen.PrimaryScreen;
            int Height = screen.Bounds.Width;
            int Width = screen.Bounds.Height;

            this.Height = Width;
            this.Width = Height;
            backend.leerXml le = new backend.leerXml();
            String var=le.leer("nombre");
            label2.Text =var;
            label2.ForeColor = Color.Blue;

            backend.fecha fec = new backend.fecha();
            var fecha = fec.month_year();
            label4.Text = fecha;
            label4.ForeColor = Color.Blue;
            label6.ForeColor = Color.Blue;
            panel5.Width = Height;
            panel6.Width = Height;
            panel6.BackColor = Color.Green;
            label7.Font = new System.Drawing.Font(label1.Font, FontStyle.Bold);
            label8.Font = new System.Drawing.Font(label1.Font, FontStyle.Bold);
            comboBox1.DataSource = backend.usuarios.usuarios_back.llenar_combo();
            comboBox1.Text = "usuario";
            dataGridView1.Height = this.Height-220;
            label6.Text = "USUARIOS";
            dataGridView1.Visible = false;

            listUserAutorizeForm.Add("control total");
        }
Esempio n. 2
0
        public Proveedor()
        {
            InitializeComponent();
            Screen screen = Screen.PrimaryScreen;
            int    Height = screen.Bounds.Width;
            int    Width  = screen.Bounds.Height;

            this.Height = Width;
            this.Width  = Height;
            backend.leerXml le  = new backend.leerXml();
            String          var = le.leer("nombre");

            label2.Text      = var;
            label2.ForeColor = Color.Blue;

            backend.fecha fec   = new backend.fecha();
            var           fecha = fec.month_year();

            label4.Text          = fecha;
            label4.ForeColor     = Color.Blue;
            label6.ForeColor     = Color.Blue;
            panel5.Width         = Height;
            panel6.Width         = Height;
            panel6.BackColor     = Color.Green;
            label7.Font          = new System.Drawing.Font(label1.Font, FontStyle.Bold);
            label8.Font          = new System.Drawing.Font(label1.Font, FontStyle.Bold);
            comboBox1.DataSource = backend.proveedores_back.llenar_combo();
            dataGridView1.Height = this.Height - 220;
            //String clave=GUI.usuarios.Login.Obusuario.Clave;
        }
Esempio n. 3
0
        public addUser()
        {
            InitializeComponent();

            backend.leerXml le  = new backend.leerXml();
            String          var = le.leer("nombre");

            label2.Text      = var;
            label2.ForeColor = Color.Blue;
            backend.fecha fec   = new backend.fecha();
            var           fecha = fec.month_year();

            label4.Text       = fecha;
            label4.ForeColor  = Color.Blue;
            label6.ForeColor  = Color.Blue;
            label6.Text       = "USUARIOS";
            this.MaximizeBox  = false;
            this.AutoSize     = true;
            this.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            CenterToScreen();
            comboBox1.DataSource  = backend.usuarios.usuarios_back.llenar_combo_idPermiso();
            textBox2.PasswordChar = '*';
            if (com1.Equals(""))
            {
                linkLabel1.Visible = false;
            }
            pictureBox9.Visible = false;
        }
Esempio n. 4
0
        public Proveedor()
        {
            InitializeComponent();
            Screen screen = Screen.PrimaryScreen;
            int Height = screen.Bounds.Width;
            int Width = screen.Bounds.Height;

            this.Height = Width;
            this.Width = Height;
            backend.leerXml le = new backend.leerXml();
            String var = le.leer("nombre");
            label2.Text = var;
            label2.ForeColor = Color.Blue;

            backend.fecha fec = new backend.fecha();
            var fecha = fec.month_year();
            label4.Text = fecha;
            label4.ForeColor = Color.Blue;
            label6.ForeColor = Color.Blue;
            panel5.Width = Height;
            panel6.Width = Height;
            panel6.BackColor = Color.Green;
            label7.Font = new System.Drawing.Font(label1.Font, FontStyle.Bold);
            label8.Font = new System.Drawing.Font(label1.Font, FontStyle.Bold);
            comboBox1.DataSource = backend.proveedores_back.llenar_combo();
            dataGridView1.Height = this.Height - 220;
            //String clave=GUI.usuarios.Login.Obusuario.Clave;
        }
Esempio n. 5
0
        public PUsuario()
        {
            InitializeComponent();
            Screen screen = Screen.PrimaryScreen;
            int    Height = screen.Bounds.Width;
            int    Width  = screen.Bounds.Height;

            this.Height = Width;
            this.Width  = Height;
            backend.leerXml le  = new backend.leerXml();
            String          var = le.leer("nombre");

            label2.Text      = var;
            label2.ForeColor = Color.Blue;

            backend.fecha fec   = new backend.fecha();
            var           fecha = fec.month_year();

            label4.Text           = fecha;
            label4.ForeColor      = Color.Blue;
            label6.ForeColor      = Color.Blue;
            panel5.Width          = Height;
            panel6.Width          = Height;
            panel6.BackColor      = Color.Green;
            label7.Font           = new System.Drawing.Font(label1.Font, FontStyle.Bold);
            label8.Font           = new System.Drawing.Font(label1.Font, FontStyle.Bold);
            comboBox1.DataSource  = backend.usuarios.usuarios_back.llenar_combo();
            comboBox1.Text        = "usuario";
            dataGridView1.Height  = this.Height - 220;
            label6.Text           = "USUARIOS";
            dataGridView1.Visible = false;


            listUserAutorizeForm.Add("control total");
        }
Esempio n. 6
0
        public void createFile(String title, List <refactory> refa)
        {
            foreach (refactory ye in refa)
            {
                Console.WriteLine("item3--------------" + ye.Item3);
            }

            backend.leerXml le = new backend.leerXml();
            //String var = le.leer("ruta");
            //var archivo = "C:\\Users\\FranklinMauricio\\Desktop\\my.cs";
            var archivo = le.leer("ruta") + title + ".cs";

            // eliminar el fichero si ya existe
            if (File.Exists(archivo))
            {
                File.Delete(archivo);
            }

            // crear el fichero
            String cabeceraConstructor = "";

            using (var fileStream = File.Create(archivo))
            {
                String body            = "";
                String thisConstructor = "";
                foreach (refactory lis in refa)
                {
                    body = body + "\t \t " + "public " + getType(lis.Item3) + " " + CultureInfo.CurrentCulture.TextInfo.ToTitleCase(lis.Item2) + " {get;set;}" + "\n";
                    cabeceraConstructor = cabeceraConstructor + getType(lis.Item3) + " " + lis.Item2 + ",";
                    thisConstructor     = thisConstructor + " \t \t this." + CultureInfo.CurrentCulture.TextInfo.ToTitleCase(lis.Item2) + "=" + lis.Item2 + ";\n";
                }
                String cabeceras       = "using System; \n using System.Collections.Generic; \n using System.Linq; \n using System.Text; \n ";
                String partOne         = "namespace heladeria.backend.VO{ \n \n";
                String partOneFunction = "\t public class " + title + "{ \n";
                String methodVacio     = "\n \t public " + title + "(){}";
                //quitar la ultima coma de la cadena
                cabeceraConstructor = cabeceraConstructor.Substring(0, cabeceraConstructor.Length - 1) + ") { \n";
                thisConstructor     = thisConstructor.Substring(0, thisConstructor.Length - 1) + "  \n}";
                String constructor = "\n \t public " + title + " (" + cabeceraConstructor;
                var    texto       = new UTF8Encoding(true).GetBytes(cabeceras + partOne + partOneFunction + body + "\t" + methodVacio + constructor + thisConstructor + "\n }" + "\n }");
                fileStream.Write(texto, 0, texto.Length);

                fileStream.Flush();
                fileStream.Close();
            }
        }
Esempio n. 7
0
        public void createFile(String title, List<refactory> refa)
        {
            foreach (refactory ye in refa) {
                Console.WriteLine("item3--------------"+ye.Item3);
            }

            backend.leerXml le = new backend.leerXml();
               //String var = le.leer("ruta");
            //var archivo = "C:\\Users\\FranklinMauricio\\Desktop\\my.cs";
            var archivo = le.leer("ruta")  + title+".cs";

            // eliminar el fichero si ya existe
            if (File.Exists(archivo))
                File.Delete(archivo);

            // crear el fichero
            String cabeceraConstructor = "";
            using (var fileStream = File.Create(archivo))
            {
                String body = "";
                String thisConstructor = "";
                foreach (refactory lis in refa) {

                    body = body + "\t \t " + "public " + getType(lis.Item3) + " " + CultureInfo.CurrentCulture.TextInfo.ToTitleCase(lis.Item2) + " {get;set;}" + "\n";
                    cabeceraConstructor = cabeceraConstructor + getType(lis.Item3) + " " + lis.Item2 + ",";
                    thisConstructor = thisConstructor + " \t \t this." + CultureInfo.CurrentCulture.TextInfo.ToTitleCase(lis.Item2) + "=" + lis.Item2 + ";\n";
                }
                String cabeceras = "using System; \n using System.Collections.Generic; \n using System.Linq; \n using System.Text; \n ";
                String partOne = "namespace heladeria.backend.VO{ \n \n";
                String partOneFunction = "\t public class " + title + "{ \n";
                String methodVacio = "\n \t public " + title + "(){}";
                //quitar la ultima coma de la cadena
                cabeceraConstructor = cabeceraConstructor.Substring(0, cabeceraConstructor.Length - 1) + ") { \n";
                thisConstructor = thisConstructor.Substring(0, thisConstructor.Length - 1) + "  \n}";
                String constructor = "\n \t public " + title + " (" + cabeceraConstructor ;
                var texto = new UTF8Encoding(true).GetBytes(cabeceras + partOne + partOneFunction + body + "\t" + methodVacio + constructor  + thisConstructor + "\n }" + "\n }");
                fileStream.Write(texto, 0, texto.Length);

                fileStream.Flush();
                fileStream.Close();
            }
        }
Esempio n. 8
0
        public addProveedor()
        {
            InitializeComponent();

            backend.leerXml le = new backend.leerXml();
            String var = le.leer("nombre");
            label2.Text = var;
            label2.ForeColor = Color.Blue;
            backend.fecha fec = new backend.fecha();
            var fecha = fec.month_year();
            label4.Text = fecha;
            label4.ForeColor = Color.Blue;
            label6.ForeColor = Color.Blue;
            label6.Text = "USUARIOS";
            this.MaximizeBox = false;
            this.AutoSize = true;
            this.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            CenterToScreen();
            this.panel6.BackColor = Color.LightBlue;
            comboBox1.DataSource = backend.proveedores_back.llenar_combo_categoria();
        }
Esempio n. 9
0
        public addProveedor()
        {
            InitializeComponent();

            backend.leerXml le  = new backend.leerXml();
            String          var = le.leer("nombre");

            label2.Text      = var;
            label2.ForeColor = Color.Blue;
            backend.fecha fec   = new backend.fecha();
            var           fecha = fec.month_year();

            label4.Text       = fecha;
            label4.ForeColor  = Color.Blue;
            label6.ForeColor  = Color.Blue;
            label6.Text       = "USUARIOS";
            this.MaximizeBox  = false;
            this.AutoSize     = true;
            this.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            CenterToScreen();
            this.panel6.BackColor = Color.LightBlue;
            comboBox1.DataSource  = backend.proveedores_back.llenar_combo_categoria();
        }
Esempio n. 10
0
        public addUser()
        {
            InitializeComponent();

            backend.leerXml le = new backend.leerXml();
            String var = le.leer("nombre");
            label2.Text = var;
            label2.ForeColor = Color.Blue;
            backend.fecha fec = new backend.fecha();
            var fecha = fec.month_year();
            label4.Text = fecha;
            label4.ForeColor = Color.Blue;
            label6.ForeColor = Color.Blue;
            label6.Text = "USUARIOS";
            this.MaximizeBox = false;
            this.AutoSize = true;
            this.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            CenterToScreen();
            comboBox1.DataSource = backend.usuarios.usuarios_back.llenar_combo_idPermiso();
            textBox2.PasswordChar = '*';
            if (com1.Equals(""))
                linkLabel1.Visible = false;
            pictureBox9.Visible = false;
        }