Beispiel #1
0
        private void AddInvoice()
        {
            DataTable ids = this.voucher.GetIds();

            this.txtvoucher.Items.Clear();
            if (ids.Rows.Count != 0)
            {
                DomainUpDown.DomainUpDownItemCollection items = this.txtvoucher.Items;
                int    nextId = this.voucher.GetNextId();
                string str1   = nextId.ToString();
                items.Add((object)str1);
                for (int index = 0; index < ids.Rows.Count; ++index)
                {
                    this.txtvoucher.Items.Add((object)ids.Rows[index]["voucherno"].ToString());
                }
                this.txtvoucher.SelectedIndex = 0;
                DomainUpDown domainUpDown = this.txtvoucher;
                nextId = this.voucher.GetNextId();
                string str2 = nextId.ToString();
                domainUpDown.Text = str2;
            }
            else
            {
                this.txtvoucher.Text = this.voucher.GetNextId().ToString();
            }
        }
Beispiel #2
0
        private void Form3_Load(object sender, EventArgs e)
        {
            nomStorelbl.Text = Form1.variableCompartida;
            DomainUpDown.DomainUpDownItemCollection tipo = this.dupDownTipoV.Items;
            tipo.Add("Calafia");
            tipo.Add("Camion");
            tipo.Add("Ruta");
            tipo.Add("Privado");

            DomainUpDown.DomainUpDownItemCollection combustible = this.dupDownTcombus.Items;
            combustible.Add("Diesel");
            combustible.Add("Gasolina");
            combustible.Add("Hibrido");

            if (Form1.variableCompartida != "Admin")
            {
                downAsig.Hide();
                lblAsign.Hide();
            }

            DomainUpDown.DomainUpDownItemCollection gremio = this.downAsig.Items;
            gremio.Add("Rojo");
            gremio.Add("Verde");
            gremio.Add("Blanco");
            gremio.Add(" ");

            // Set Text.
            //this.downAsig.Text = "Dot";
        }
        public ChytanieNNForm(Jadro jadro)
        {
            InitializeComponent();
            textBoxCena.Text = Config.CenaNN.ToString();
            //ClientSize = new System.Drawing.Size(1325, Screen.PrimaryScreen.WorkingArea.Size.Height-50);
            this._jadro     = jadro;
            webBrowser1.Url = new Uri("http://www.stargate-game.cz/obchod.php?page=6#pl-prodej");
            webBrowser1.ScriptErrorsSuppressed = true;
            _pocetLoad = 0;
            _koniec    = false;
            TopMost    = false;

            textBoxRelatX.Text = Config.RelativnaSuradnicaX;
            textBoxRelatY.Text = Config.RelativnaSuradnicaY;

            DomainUpDown.DomainUpDownItemCollection itemsHodiny = domainUpDownHodiny.Items;
            for (int i = 23; i >= 0; i--)
            {
                itemsHodiny.Add(i);
            }
            DomainUpDown.DomainUpDownItemCollection itemsMinuty = domainUpDownMinuty.Items;
            for (int i = 59; i >= 0; i--)
            {
                itemsMinuty.Add(i);
            }

            textNp     = Config.TextNp;
            NNMinMinut = int.Parse(Config.NNMinMinut);
            NNMaxMinut = int.Parse(Config.NNMaxMinut);
        }
Beispiel #4
0
        private void InsertINTO_DUD_Editions()
        {
            sqlConnection.Open();
            Console.WriteLine("Connection open");
            //Выборка данных их БД
            SqlCommand command = new SqlCommand
            {
                CommandText = "SELECT Name FROM Editions",
                Connection  = sqlConnection
            };

            //Выполнение запроса к БД
            SqlDataReader reader = command.ExecuteReader();

            //Если есть данные в выборке
            if (reader.HasRows)
            {
                //перебор результата выборки
                while (reader.Read())
                {
                    object Lastname = reader.GetValue(0);
                    DomainUpDown.DomainUpDownItemCollection collection = this.DUD_Editions.Items;
                    collection.Add(Lastname);
                }
            }
            sqlConnection.Close();
        }
Beispiel #5
0
 private void Form4_Load(object sender, EventArgs e)
 {
     DomainUpDown.DomainUpDownItemCollection gremio = this.downAsig.Items;
     gremio.Add("Rojo");
     gremio.Add("Verde");
     gremio.Add("Blanco");
     gremio.Add(" ");
 }
Beispiel #6
0
 private void cadItens_Load(object sender, EventArgs e)
 {
     DomainUpDown.DomainUpDownItemCollection collection = this.txGarantia.Items;
     for (int i = 1; i <= 36; i++)
     {
         collection.Add(i);
     }
 }
Beispiel #7
0
 private void Form1_Load(object sender, EventArgs e)
 {
     DomainUpDown.DomainUpDownItemCollection collection = this.portDomain.Items;
     collection.Add("587");        //2 typy portow
     collection.Add("25");
     portDomain.SelectedIndex = 0; //domyslny indeks 0
     attachementListBox.Hide();
 }
Beispiel #8
0
 public Biodata()
 {
     InitializeComponent();
     DomainUpDown.DomainUpDownItemCollection collection = this.domainUpDown1.Items;
     collection.Add("Pria");
     collection.Add("Wanita");
     this.domainUpDown1.Text = "Pria";
     mode = Mode.Insert;
 }
Beispiel #9
0
 public socio_demog()
 {
     InitializeComponent();
     DomainUpDown.DomainUpDownItemCollection collection = this.domain_filhos_sdm.Items;
     collection.Add("0");
     collection.Add("1");
     collection.Add("2");
     collection.Add("3 ou +");
 }
Beispiel #10
0
 private void Search_Load(object sender, EventArgs e)
 {
     DomainUpDown.DomainUpDownItemCollection collection = this.searchDomain.Items;
     for (int i = 0; i < arrDomain.Length; i++)
     {
         collection.Add(arrDomain[i]);
     }
     this.searchDomain.Text     = arrDomain[0];
     this.searchDomain.ReadOnly = true;
 }
Beispiel #11
0
 private void шифр_Load(object sender, EventArgs e)
 {
     DomainUpDown.DomainUpDownItemCollection collection = this.domainUpDown1.Items;
     collection.Add("ASCII");
     collection.Add("HEX");
     collection.Add("Base64");
     collection.Add("Base32");
     collection.Add("RSI");
     collection.Add("MD5");
 }
 public LaTeXcelDocumentSettings()
 {
     InitializeComponent();
     DomainUpDown.DomainUpDownItemCollection col = domLetra.Items;
     col.Add("8pt.");
     col.Add("9pt.");
     col.Add("10pt.");
     col.Add("11pt.");
     col.Add("12pt.");
     domLetra.SelectedIndex = 2;
 }
Beispiel #13
0
        private void Adicionaremp_Load(object sender, EventArgs e)
        {
            DomainUpDown.DomainUpDownItemCollection collection = this.tipoT.Items;

            collection.Add("Rececao");
            collection.Add("Bar");
            collection.Add("Staff");
            collection.Add("Limpeza");
            collection.Add("Seguranca");

            this.tipoT.Text = "Limpeza";
        }
Beispiel #14
0
        private void Form1_Load2(object sender, EventArgs e)
        {
            DomainUpDown.DomainUpDownItemCollection collection = this.domainUpDown1.Items;
            collection.Add("3 sec");
            collection.Add("10 sec");
            collection.Add("30 sec");
            collection.Add("1 min");
            collection.Add("10 min");
            collection.Add("30 min");
            collection.Add("1 hour");

            this.domainUpDown1.Text = "3 sec";
        }
Beispiel #15
0
        private void FirstPage_Load(object sender, EventArgs e)
        {
            boxArtist.Select();
            DomainUpDown.DomainUpDownItemCollection collection = this.priorityPicker.Items;
            collection.Add("0");
            collection.Add("1");
            collection.Add("2");
            collection.Add("3");
            collection.Add("4");
            collection.Add("5");

            //Set the default number in the Priority Picker
            this.priorityPicker.Text = "5";
        }
Beispiel #16
0
        public void getData()
        {
            string         query = "Select TEN_NCC, SP.TEN_SP,GIANHAP,SOLUONG from NCC JOIN SP ON NCC.MA_NCC = SP.MA_NCC;";
            SqlDataAdapter apt   = new SqlDataAdapter(query, Connect);
            DataTable      tb    = new DataTable();

            apt.Fill(tb);
            dataGridView1.DataSource = tb;

            for (int i = 0; i < 50; i++)
            {
                DomainUpDown.DomainUpDownItemCollection collect = this.txtSL.Items;
                collect.Add(i);
            }
        }
Beispiel #17
0
        private DomainUpDown GetNewDomainUpDown(bool sorted = false)
        {
            var domainUpDown = new DomainUpDown
            {
                Sorted = sorted
            };

            DomainUpDown.DomainUpDownItemCollection items = domainUpDown.Items;
            Assert.NotNull(items);
            items.Add("foo1");
            items.Add("foo2");
            items.Add("foo3");
            items.Add("Cowman");
            items.Add("foo4");

            return(domainUpDown);
        }
Beispiel #18
0
 private void domainUpDownKubikaza_KeyDown(object sender, KeyEventArgs e)
 //private void domainUpDownKubikaza_KeyUp(object sender, KeyEventArgs e)
 {
     // Kubikaze.
     DomainUpDown.DomainUpDownItemCollection items = this.domainUpDownKubikaza.Items;
     items.Add("900");
     items.Add("1000");
     items.Add("1100");
     items.Add("1200");
     items.Add("1300");
     items.Add("1500");
     items.Add("1800");
     items.Add("2000");
     items.Add("3000");
     items.Add("4000");
     items.Add("5000");
     items.Add("6000");
 }
Beispiel #19
0
        private void domainUpDown1_SelectedItemChanged(object sender, EventArgs e)
        {
            DomainUpDown.DomainUpDownItemCollection collection = this.domainUpDown1.Items;
            collection.Add("January");
            collection.Add("February");
            collection.Add("March");
            collection.Add("April");
            collection.Add("Maj");
            collection.Add("Juni");
            collection.Add("July");
            collection.Add("August");
            collection.Add("September");
            collection.Add("October");
            collection.Add("November");
            collection.Add("Dececember");

            //this.domainUpDown1.Text = "January";
        }
Beispiel #20
0
        private void button1_Click(object sender, EventArgs e)
        {
            isClient = false;
            StepForward();
            servering = new Thread(DoServer);

            try
            {
                localIP = LocalIPAddress().ToString();

                DomainUpDown.DomainUpDownItemCollection collection = domainUpDown1.Items;
                collection.Add("127.0.0.1");
                collection.Add(localIP);
            }
            catch (Exception)
            {
            }
        }
        private void Form_Options_Load(object sender, EventArgs e)
        {
            DomainUpDown.DomainUpDownItemCollection collection    = this.dUD_Rounds.Items;
            DomainUpDown.DomainUpDownItemCollection collectionSec = this.dUD_Seconds.Items;

            collection.Add("3");
            collection.Add("5");
            collection.Add("7");
            collection.Add("9");

            this.dUD_Rounds.Text = "Select";

            for (int i = 10; i <= 90; i++)
            {
                collectionSec.Add(i.ToString());
            }

            this.dUD_Seconds.Text = "Select";
        }
Beispiel #22
0
        private void FormLoadcellCalib_Load(object sender, EventArgs e)
        {
            this.Left = 620;
            this.Top  = 170;

            refreshTimer.Enabled = true;

            DomainUpDown.DomainUpDownItemCollection items = this.UD_TargetForce.Items;

            for (double force = 0.5; force < 5; force += 0.5)
            {
                items.Add(force.ToString());
            }

            this.UD_TargetForce.SelectedIndex = 3;              // 5;

            CB_VoltageInterval.SelectedIndex = 1;               // 0.5v, 1v(Default), 2v
            CB_CheckDistance.SelectedIndex   = 1;               // 50um, 100um(Default), 200um
            cb_selectedTool.SelectedIndex    = (int)UnitCodeHead.HD1;
            BT_StopCalib.Enabled             = false;
        }
Beispiel #23
0
        private void other_sendDataOnePlInForm(object sender, UserEventArgsOnePlProp e)
        {
            if (e.CorrectlyGet == true)
            {
                pnlOnePnl.Enabled = true;
                btGetPL.Text      = "Полилиния выбрана!Изменить?";

                // ренумерация вершин только для замкнутых линий
                if (e.ClosedPl == false)
                {
                    gbRenumerateVertexPl.Enabled = false;// ренумерация вершин только для замкнутых линий
                }
                else
                {
                    gbRenumerateVertexPl.Enabled = true;
                    DomainUpDown.DomainUpDownItemCollection vertexCollection = this.dmUpDwnVertexInPl.Items;

                    for (int i = 1; i <= e.PlVertexCount; i++)
                    {
                        vertexCollection.Add(i);
                    }
                    dmUpDwnVertexInPl.Text = "1"; // инциализация начальной вершины, для выбора
                }
            }
            else
            {
                pnlOnePnl.Enabled = false;
                btGetPL.Text      = "Выберите полилинию";
                MessageBox.Show("Выбрана не полилиния и не 3D полилиния!");
                return;
            }

            HandlerPolyline onePolyline = new HandlerPolyline(e.PlineGetFromUser);

            onePl = onePolyline;
        }
Beispiel #24
0
        private void Form2_Load(object sender, EventArgs e)
        {
            DomainUpDown.DomainUpDownItemCollection gremio = this.downAsigB.Items;
            //esta variable toma el valor de el boton del form 1
            //ya sea admin, rojo, verde o blanco
            string v;


            v = nomStorelbl.Text = Form1.variableCompartida;
            //Mostrar Datos de la bd.
            SqlConnection conn = new SqlConnection(Conexion.StringConexion());

            //SqlCommand comando = new SqlCommand("SELECT * FROM Vehiculo; ", conn);

            if (v == "Rojo" || v == "Verde" || v == "Blanco")
            {
                btnElimina.Visible       = false;
                btnEliminaGremio.Visible = false;
                btnAsignar.Visible       = false;
                btnFiltrar.Visible       = false;
                downAsigB.Visible        = false;
                //
                //
                SqlCommand comando2 = new SqlCommand("SELECT * FROM Vehiculo WHERE NombreGremio= @gremio; ", conn);
                comando2.Parameters.AddWithValue("@gremio", v);

                adapter.SelectCommand = comando2;

                if (v == "Rojo")
                {
                    gremio.Add("Rojo");
                    gremio.Add(" ");
                }
                else if (v == "Verde")
                {
                    gremio.Add("Verde");
                    gremio.Add(" ");
                }
                else if (v == "Blanco")
                {
                    gremio.Add("Blanco");
                    gremio.Add(" ");
                }
                adapter.Fill(tabla);
                dataGridView1.DataSource = tabla;
            }


            else
            {
                SqlCommand comandi = new SqlCommand("SELECT * FROM Vehiculo; ", conn);
                gremio.Add("Rojo");
                gremio.Add("Verde");
                gremio.Add("Blanco");
                gremio.Add(" ");

                adapter.SelectCommand = comandi;

                adapter.Fill(tabla);

                dataGridView1.DataSource = tabla;
            }

            /*
             * string v = Form1.variableCompartida;string g;
             * if (v == "Rojo")
             * {
             *  g = "Rojo";
             *  btnElimina.Visible = false;
             *  btnEliminaGremio.Visible = false;
             *  SqlCommand comando = new SqlCommand("SELECT * FROM Vehiculo WHERE NombreGremio= @gremio; ", conn);
             *  comando.Parameters.AddWithValue("@gremio", gremio);
             * }
             * else if (v == "Verde")
             * {
             *  g = "Verde";
             *  btnElimina.Visible = false;
             *  btnEliminaGremio.Visible = false;
             *  SqlCommand comando = new SqlCommand("SELECT * FROM Vehiculo WHERE NombreGremio= @gremio; ", conn);
             *  comando.Parameters.AddWithValue("@gremio", gremio);
             *
             *
             * }
             * else if (v == "Blanco")
             * {
             *  g = "Blanco";
             *  btnElimina.Visible = false;
             *  btnEliminaGremio.Visible = false;
             *  SqlCommand comando = new SqlCommand("SELECT * FROM Vehiculo WHERE NombreGremio= @gremio; ", conn);
             *  comando.Parameters.AddWithValue("@gremio", gremio);
             *
             *  SqlDataAdapter adapter = new SqlDataAdapter();
             *  adapter.SelectCommand = comando;
             *  DataTable tabla = new DataTable();
             *  adapter.Fill(tabla);
             *
             *  dataGridView1.DataSource = tabla;
             * }
             *
             * else
             * {
             *
             *  SqlCommand comando = new SqlCommand("SELECT * FROM Vehiculo; ", conn);
             *
             *  SqlDataAdapter adapter = new SqlDataAdapter();
             *  adapter.SelectCommand = comando;
             *  DataTable tabla = new DataTable();
             *  adapter.Fill(tabla);
             *
             *  dataGridView1.DataSource = tabla;
             * }
             *
             */
        }
        private void Form6_Load(object sender, EventArgs e)
        {
            DomainUpDown.DomainUpDownItemCollection collection = this.SKILL_BOX.Items;
            Dictionary <string, int> d = new Dictionary <string, int>();
            DataTable      dt          = new DataTable();
            SqlConnection  con         = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\suman\Documents\Login.mdf;Integrated Security=True;Connect Timeout=30");
            SqlDataAdapter sda         = new SqlDataAdapter("Select SKILLS from [Trainee] where EMPCODE ='" + Form5.userCode + "'", con);

            sda.Fill(dt);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string skill = "";
                skill = (string)(dt.Rows[i][0]);
                string[] skillsList = skill.Split(',');
                foreach (string word in skillsList)
                {
                    if (d.ContainsKey(word.ToLower()))
                    {
                        d[word.ToLower()] = d[word.ToLower()] + 1;
                    }
                    else
                    {
                        d.Add(word.ToLower(), 1);
                    }
                }
            }
            //chart1.Series["Series1"].IsValueShownAsLabel = true; ;
            foreach (var key in d.Keys)
            {
                collection.Add(key);
            }
            this.SKILL_BOX.Text = "SELECT SKILLS";
            DomainUpDown.DomainUpDownItemCollection xyz = this.PROJECT_BOX.Items;
            d  = new Dictionary <string, int>();
            dt = new DataTable();
            //SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\suman\Documents\Login.mdf;Integrated Security=True;Connect Timeout=30");
            sda = new SqlDataAdapter("Select PROJECTTITLE from [TRAINEEWORK],[Trainee] where [TRAINEEWORK].EMPCODE ='" + Form5.userCode + "' AND [TRAINEEWORK].ID=[Trainee].ID", con);
            sda.Fill(dt);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string word = "";
                word = (string)(dt.Rows[i][0]);
                //string[] skillsList = skill.Split(',');
                // foreach (string word in skillsList)
                // {
                if (d.ContainsKey(word.ToLower()))
                {
                    d[word.ToLower()] = d[word.ToLower()] + 1;
                }
                else
                {
                    d.Add(word.ToLower(), 1);
                }
            }
            //chart1.Series["Series1"].IsValueShownAsLabel = true; ;
            foreach (var key in d.Keys)
            {
                xyz.Add(key);
            }
            this.PROJECT_BOX.Text = "SELECT PROJECT";
        }