Exemple #1
0
        private void Izveshtaj_Klient_Load_1(object sender, EventArgs e)
        {
            this.Width      = 640;
            this.Height     = 250;
            this.Text       = "Извештај Клиент";
            this.BackColor  = Color.FromArgb(244, 66, 66);
            this.ControlBox = false;

            ComboBoxZ cbizbor = new ComboBoxZ(50, 20, 100, 40, cb);

            cb.Items.Add("Име");
            cb.Items.Add("Презиме");
            cb.Items.Add("Телефон");
            cb.Items.Add("ЕМБГ");
            cb.Items.Add("E-маил");
            Controls.Add(cb);

            TextBoxZ tbizbor = new TextBoxZ(170, 20, tb);

            Controls.Add(tb);

            ButtonZ btok = new ButtonZ(70, 70, "OK", bt);

            bt.Click += new EventHandler(this.fprikazi);
            Controls.Add(bt);

            ButtonZ btizlez = new ButtonZ(170, 70, "Излез", bt1);

            bt1.Click += new EventHandler(this.fizlez);
            Controls.Add(bt1);
        }
        private void Izbrishi_Prodavnica_Load(object sender, EventArgs e)
        {
            this.Width      = 640;
            this.Height     = 600;
            this.BackColor  = Color.FromArgb(244, 66, 66);
            this.Text       = "Избриши Продавница";
            this.ControlBox = false;


            Label  lbprikaz  = new Label();
            LabelZ lbprikazi = new LabelZ(50, 50, 350, 12, "Приказ на податоци во Продавница:", lbprikaz);

            Controls.Add(lbprikaz);

            Label  lbbrishi   = new Label();
            LabelZ lbizbrishi = new LabelZ(50, 400, 300, 12, "Внесете реден број за бришење:", lbbrishi);

            Controls.Add(lbbrishi);

            TextBoxZ tb_redbroj = new TextBoxZ(360, 400, tbredbroj);

            Controls.Add(tbredbroj);

            ButtonZ bt_ok = new ButtonZ(300, 460, "OK", btok);

            btok.Click += new EventHandler(this.fizbrisi);
            Controls.Add(btok);

            ButtonZ bt_izlez = new ButtonZ(400, 460, "Излез", btizlez);

            btizlez.Click += new EventHandler(this.fizlez);
            Controls.Add(btizlez);

            dgvArtikal.Width    = 555;
            dgvArtikal.Height   = 170;
            dgvArtikal.Location = new Point(50, 90);

            dgvArtikal.DataSource = bindingSource;
            conn.Open();
            dataAdapter = new SqlDataAdapter("select id_artikal AS РеденБрој, Ime AS Име, Tezina AS Тежина, Cena AS Цена,Kolicina AS Количина from Artikal where (id_podklasa < 3)", conn);
            SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);
            DataTable         table          = new DataTable();

            table.Locale = System.Globalization.CultureInfo.InvariantCulture;
            dataAdapter.Fill(table);
            dgvArtikal.DataSource = table;
            Controls.Add(dgvArtikal);
            conn.Close();
        }
Exemple #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.Width     = 640;
            this.Height    = 600;
            this.BackColor = Color.FromArgb(244, 66, 66);
            this.Text      = "Логин Форма";

            TextBoxZ tbusername = new TextBoxZ(200, 200, tb);

            tb.KeyDown += new KeyEventHandler(this.enter);
            Controls.Add(tb);

            TextBoxX tbpassword = new TextBoxX(200, 260, tb1);

            tb1.KeyDown += new KeyEventHandler(this.enter);
            Controls.Add(tb1);

            ButtonZ btlogin = new ButtonZ(250, 290, "Логирајсе", bt);

            bt.Click += new EventHandler(this.click);
            Controls.Add(bt);

            Label  lb         = new Label();
            LabelZ lbkorisnik = new LabelZ(250, 180, 150, 10, "Корисничко име", lb);

            lb.Font = new Font("Roboto", 10, FontStyle.Regular);
            Controls.Add(lb);

            Label  lb1       = new Label();
            LabelZ lblozinka = new LabelZ(270, 240, 150, 10, "Лозинка", lb1);

            lb1.Font = new Font("Roboto", 10, FontStyle.Regular);
            Controls.Add(lb1);

            PictureBox logo = new PictureBox();

            logo.Width         = 300;
            logo.Height        = 100;
            logo.SizeMode      = PictureBoxSizeMode.StretchImage;
            logo.Location      = new Point(150, 40);
            logo.ImageLocation = "C:\\Users\\Mihajlo\\Desktop\\Proekt\\logo.png";
            Controls.Add(logo);
        }
Exemple #4
0
        private void Vnesi_Hrana_Load(object sender, EventArgs e)
        {
            this.Width      = 1000;
            this.Height     = 900;
            this.Text       = "Внеси продавница";
            this.BackColor  = Color.FromArgb(255, 66, 66);
            this.ControlBox = false;

            Label  lbnaslov  = new Label();
            LabelZ lbnaslov1 = new LabelZ(300, 20, 300, 18, "Внеси во продавница", lbnaslov);

            lbnaslov.Font = new Font("Roboto", 18, FontStyle.Underline);
            Controls.Add(lbnaslov);

            RadioButtonZ rb = new RadioButtonZ(30, 70, 150, 40, "Класа", 12, rbklasa);

            rbklasa.Click += new EventHandler(this.faktiviraj);
            Controls.Add(rbklasa);

            RadioButtonZ rb1 = new RadioButtonZ(30, 120, 150, 40, "Подкласа", 12, rbpodklasa);

            rbpodklasa.Click += new EventHandler(this.faktiviraj);
            Controls.Add(rbpodklasa);

            RadioButtonZ rb2 = new RadioButtonZ(30, 170, 150, 40, "Нов Артикал", 12, rbartikal);

            rbartikal.Click += new EventHandler(this.faktiviraj);
            Controls.Add(rbartikal);

            //ButtonZ bt = new ButtonZ(80, 220, "OK", btvnesi);
            //btvnesi.Click += new EventHandler(this.faktiviraj);
            //Controls.Add(btvnesi);

            gbklasa.Width     = 300;
            gbklasa.Height    = 300;
            gbklasa.ForeColor = Color.White;
            gbklasa.BackColor = Color.FromArgb(255, 66, 66);
            gbklasa.Text      = "Класа";
            gbklasa.Location  = new Point(350, 70);
            gbklasa.Enabled   = false;
            Controls.Add(gbklasa);

            Label  lbklasa_ime = new Label();
            LabelZ lbklasa     = new LabelZ(70, 30, 180, 14, "Име на класата", lbklasa_ime);

            gbklasa.Controls.Add(lbklasa_ime);

            TextBoxZ vnesi_klasa = new TextBoxZ(50, 70, tbvnesi_klasa);

            gbklasa.Controls.Add(tbvnesi_klasa);

            ButtonZ btvnesiklasa = new ButtonZ(100, 100, "OK", btvnesi_klasa);

            btvnesi_klasa.Click += new EventHandler(this.fvnesi);
            gbklasa.Controls.Add(btvnesi_klasa);


            gbpodklasa.Width     = 300;
            gbpodklasa.Height    = 300;
            gbpodklasa.ForeColor = Color.White;
            gbpodklasa.BackColor = Color.FromArgb(255, 66, 66);
            gbpodklasa.Text      = "Подкласа";
            gbpodklasa.Location  = new Point(660, 70);
            gbpodklasa.Enabled   = false;
            Controls.Add(gbpodklasa);

            // Label lbizbor = new Label();
            // LabelZ lbizbor_klasa = new LabelZ(20, 20, 180, 14, "Изберете класа", lbizbor);
            //gbpodklasa.Controls.Add(lbizbor);

            // ComboBoxZ cbizbor = new ComboBoxZ(20, 60, 100, 40, cbizbor_klasa);
            //gbpodklasa.Controls.Add(cbizbor_klasa);

            Label  lbime_podklasa = new Label();
            LabelZ lbime_klasa    = new LabelZ(70, 30, 180, 14, "Име на подкласа", lbime_podklasa);

            gbpodklasa.Controls.Add(lbime_podklasa);


            TextBoxZ ime_podklasa = new TextBoxZ(50, 70, tbime_podklasa);

            gbpodklasa.Controls.Add(tbime_podklasa);

            ButtonZ vnesi_podklasa = new ButtonZ(100, 100, "OK", btvnesi_podklasa);

            btvnesi_podklasa.Click += new EventHandler(this.fvnesi);
            gbpodklasa.Controls.Add(btvnesi_podklasa);

            gbartikal.Width     = 300;
            gbartikal.Height    = 400;
            gbartikal.ForeColor = Color.White;
            gbartikal.BackColor = Color.FromArgb(255, 66, 66);
            gbartikal.Text      = "Нов Артикал";
            gbartikal.Location  = new Point(500, 380);
            gbartikal.Enabled   = false;
            Controls.Add(gbartikal);

            Label  lbpodklasa  = new Label();
            LabelZ lbpod_klasa = new LabelZ(30, 30, 180, 10, "Изберете подкласа", lbpodklasa);

            gbartikal.Controls.Add(lbpodklasa);

            ComboBoxZ cbizborpodklasa = new ComboBoxZ(30, 60, 150, 40, cbizbor_podklasa);

            gbartikal.Controls.Add(cbizbor_podklasa);

            Label  lbime_artikal  = new Label();
            LabelZ lb_ime_artikal = new LabelZ(30, 90, 110, 10, "Внесете име", lbime_artikal);

            gbartikal.Controls.Add(lbime_artikal);

            TextBoxZ tb_ime_artikal = new TextBoxZ(30, 120, tbime_artikal);

            gbartikal.Controls.Add(tbime_artikal);

            Label  lb_cena_artikal = new Label();
            LabelZ lbcena_artikal  = new LabelZ(30, 150, 150, 10, "Внесете Цена", lb_cena_artikal);

            gbartikal.Controls.Add(lb_cena_artikal);

            TextBoxZ tb_cena_artikal = new TextBoxZ(30, 180, tbcena_artikal);

            gbartikal.Controls.Add(tbcena_artikal);

            Label  lb_gramaza_artikal = new Label();
            LabelZ lbgramaza_artikal  = new LabelZ(30, 210, 180, 10, "Внесете грамажа", lb_gramaza_artikal);

            gbartikal.Controls.Add(lb_gramaza_artikal);

            TextBoxZ tb_gramaza_artikal = new TextBoxZ(30, 240, tbgramaza_artikal);

            gbartikal.Controls.Add(tbgramaza_artikal);

            Label  lb_kolicina_artikal = new Label();
            LabelZ lbkolicina_artikal  = new LabelZ(30, 280, 180, 10, "Внесете количина", lb_kolicina_artikal);

            gbartikal.Controls.Add(lb_kolicina_artikal);

            TextBoxZ tb_kolicina_artikal = new TextBoxZ(30, 310, tbkolicina_artikal);

            gbartikal.Controls.Add(tbkolicina_artikal);


            ButtonZ btartikalvnesi = new ButtonZ(80, 350, "OK", bt_vnesiartikal);

            bt_vnesiartikal.Click += new EventHandler(this.fvnesi);
            gbartikal.Controls.Add(bt_vnesiartikal);

            ButtonZ btizlez = new ButtonZ(80, 260, "Излез", bt_izlez);

            bt_izlez.Click += new EventHandler(this.fizlez);
            Controls.Add(bt_izlez);

/*            conn.Open();
 *          SqlCommand command = conn.CreateCommand();
 *          command.CommandType = CommandType.Text;
 *          command.CommandText = "select Ime from Klasa";
 *          command.ExecuteNonQuery();
 *          DataTable table = new DataTable();
 *          SqlDataAdapter dataAdapter = new SqlDataAdapter(command);
 *          dataAdapter.Fill(table);
 *          foreach (DataRow dr in table.Rows)
 *          {
 *              cbizbor_klasa.Items.Add(dr["Ime"].ToString());
 *          }
 *          conn.Close();
 */
            conn.Open();
            SqlCommand     command     = conn.CreateCommand();
            SqlDataAdapter dataAdapter = new SqlDataAdapter(command);
            SqlCommand     cmd         = conn.CreateCommand();

            command.CommandType = CommandType.Text;
            command.CommandText = "select id_podklasa,Ime from Podklasa where id_klasa = '1' ";
            command.ExecuteNonQuery();
            DataTable      tb      = new DataTable();
            SqlDataAdapter dataAda = new SqlDataAdapter(cmd);

            dataAdapter.Fill(tb);
            foreach (DataRow dr in tb.Rows)
            {
                cbizbor_podklasa.Items.Add(dr["Ime"].ToString());
            }
            conn.Close();
        }
        private void Izmeni_Klient_Load(object sender, EventArgs e)
        {
            this.Width      = 1200;
            this.Height     = 500;
            this.BackColor  = Color.FromArgb(255, 66, 66);
            this.Text       = "Измени клиент";
            this.ControlBox = false;

            Label  lbn       = new Label();
            LabelZ lbnaslove = new LabelZ(100, 20, 280, 14, "Измени Клиент", lbn);

            lbn.Font = new Font("Roboto", 14, FontStyle.Underline);
            Controls.Add(lbn);

            dgvKlient.Width           = 650;
            dgvKlient.Height          = 200;
            dgvKlient.Location        = new Point(450, 70);
            dgvKlient.BackgroundColor = Color.FromArgb(255, 66, 66);

            dgvKlient.DataSource = bindingSource;
            conn.Open();
            dataAdapter = new SqlDataAdapter("select id_klient AS РеденБрој, Ime AS Име, Prezime AS Презиме,Telefon AS Телефон, EMBG AS ЕМБГ,Mail AS Емаил from Klient", conn);
            SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);
            DataTable         table          = new DataTable();

            table.Locale = System.Globalization.CultureInfo.InvariantCulture;
            dataAdapter.Fill(table);
            dgvKlient.DataSource = table;
            Controls.Add(dgvKlient);
            conn.Close();

            /* Label lb1 = new Label();
             * LabelZ lbIme = new LabelZ(20,70,180,12,"Изменете Име",lb1);
             * Controls.Add(lb1);
             *
             * TextBoxZ tbIme = new TextBoxZ(210,70,tb1);
             * Controls.Add(tb1);
             */
            Label  lb2       = new Label();
            LabelZ lbPrezime = new LabelZ(20, 120, 180, 12, "Изменете Презиме", lb2);

            Controls.Add(lb2);

            TextBoxZ tbPrezime = new TextBoxZ(210, 120, tb2);

            tb2.Enabled = false;
            Controls.Add(tb2);

            RadioButtonZ rb1 = new RadioButtonZ(420, 110, 15, 15, "", 10, rbPrezime);

            rbPrezime.Click += new EventHandler(this.fizmeni);
            Controls.Add(rbPrezime);

            Label  lb3       = new Label();
            LabelZ lbTelefon = new LabelZ(20, 170, 180, 12, "Изменете Телефон", lb3);

            Controls.Add(lb3);

            TextBoxZ tbTelefon = new TextBoxZ(210, 170, tb3);

            tb3.Enabled = false;
            Controls.Add(tb3);

            RadioButtonZ rb2 = new RadioButtonZ(420, 160, 15, 15, "", 10, rbTelefon);

            rbTelefon.Click += new EventHandler(this.fizmeni);
            Controls.Add(rbTelefon);

            /* Label lb4 = new Label();
             * LabelZ lbembg = new LabelZ(20,220,180,12,"Изменете ЕМБГ",lb4);
             * Controls.Add(lb4);
             *
             * TextBoxZ tbembg = new TextBoxZ(210,220,tb4);
             * Controls.Add(tb4);
             */
            Label  lb5     = new Label();
            LabelZ lbemail = new LabelZ(20, 220, 180, 12, "Изменете Е-маил", lb5);

            Controls.Add(lb5);

            TextBoxZ tbe_email = new TextBoxZ(210, 220, tb5);

            tb5.Enabled = false;
            Controls.Add(tb5);

            RadioButtonZ rb3 = new RadioButtonZ(420, 210, 15, 15, "", 10, rbmail);

            rbmail.Click += new EventHandler(this.fizmeni);
            Controls.Add(rbmail);

            ButtonZ btIzmeni = new ButtonZ(170, 320, "Измени", bt);

            bt.Font   = new Font("Roboto", 10, FontStyle.Regular);
            bt.Click += new EventHandler(this.fizmeniBAza);
            Controls.Add(bt);

            ButtonZ btizlez = new ButtonZ(280, 320, "Излез", bt1);

            bt1.Font   = new Font("Roboto", 10, FontStyle.Regular);
            bt1.Click += new EventHandler(this.fizlez);
            Controls.Add(bt1);



            Label  lb1     = new Label();
            LabelZ lb_broj = new LabelZ(420, 320, 250, 10, "Внесете реден број:", lb1);

            Controls.Add(lb1);

            TextBoxZ tb_broj = new TextBoxZ(420, 360, tb1);

            Controls.Add(tb1);
        }
Exemple #6
0
        private void Vnesi_Vraboten_Load(object sender, EventArgs e)
        {
            this.Width      = 500;
            this.Height     = 500;
            this.Text       = "Внеси Вработен";
            this.BackColor  = Color.FromArgb(255, 66, 66);
            this.Text       = "Внесување нов вработен";
            this.ControlBox = false;


            Label  lbn       = new Label();
            LabelZ lbnaslove = new LabelZ(100, 20, 280, 14, "Внесување на нов Вработен", lbn);

            lbn.Font = new Font("Roboto", 14, FontStyle.Underline);
            Controls.Add(lbn);



            Label  lb = new Label();
            LabelZ lbkorisnicko_ime = new LabelZ(20, 70, 180, 12, "Корисничко име", lb);

            Controls.Add(lb);

            TextBoxZ tbkorisnicko_ime = new TextBoxZ(210, 70, tb);

            Controls.Add(tb);

            Label  lb1   = new Label();
            LabelZ lbIme = new LabelZ(20, 120, 180, 12, "Внесете Име", lb1);

            Controls.Add(lb1);

            TextBoxZ tbIme = new TextBoxZ(210, 120, tb1);

            Controls.Add(tb1);

            Label  lb2       = new Label();
            LabelZ lbPrezime = new LabelZ(20, 170, 180, 12, "Внесете Презиме", lb2);

            Controls.Add(lb2);

            TextBoxZ tbPrezime = new TextBoxZ(210, 170, tb2);

            Controls.Add(tb2);

            Label  lb3       = new Label();
            LabelZ lbLozinka = new LabelZ(20, 220, 180, 12, "Внесете Лозинка", lb3);

            Controls.Add(lb3);

            TextBoxZ tbLozinka = new TextBoxZ(210, 220, tb3);

            Controls.Add(tb3);

            Label  lb4       = new Label();
            LabelZ lbTelefon = new LabelZ(20, 270, 180, 12, "Внесете Телефон", lb4);

            Controls.Add(lb4);

            TextBoxZ tbTelefon = new TextBoxZ(210, 270, tb4);

            Controls.Add(tb4);

            Label  lb5    = new Label();
            LabelZ lbembg = new LabelZ(20, 320, 180, 12, "ЕМБГ", lb5);

            Controls.Add(lb5);

            TextBoxZ tbembg = new TextBoxZ(210, 320, tb5);

            Controls.Add(tb5);

            Label  lb6     = new Label();
            LabelZ lbemail = new LabelZ(20, 370, 180, 12, "Внесете Е-маил", lb6);

            Controls.Add(lb6);

            TextBoxZ tbe_email = new TextBoxZ(210, 370, tb6);

            Controls.Add(tb6);

            ButtonZ btVnesi = new ButtonZ(50, 420, "Внеси", bt);

            bt.Font   = new Font("Roboto", 8, FontStyle.Regular);
            bt.Click += new EventHandler(this.fvnesi);
            Controls.Add(bt);

            ButtonZ btIzlez = new ButtonZ(170, 420, "Излез", bt1);

            bt1.Click += new EventHandler(this.fizlez);
            Controls.Add(bt1);
        }
        private void Vnesi_Kafic_Load(object sender, EventArgs e)
        {
            this.Width      = 500;
            this.Height     = 400;
            this.Text       = "Внеси кафич";
            this.BackColor  = Color.FromArgb(255, 66, 66);
            this.ControlBox = false;

            Label  lbvnesi_kafe = new Label();
            LabelZ lb_vnesikafe = new LabelZ(150, 20, 190, 14, "Внесете во кафич", lbvnesi_kafe);

            lbvnesi_kafe.Font = new Font("Roboto", 14, FontStyle.Underline);
            Controls.Add(lbvnesi_kafe);

            Label  lbtip_kafe = new Label();
            LabelZ lb_tikafe  = new LabelZ(150, 50, 250, 12, "Изберете вид", lbtip_kafe);

            Controls.Add(lbtip_kafe);

            ComboBoxZ cbtip = new ComboBoxZ(180, 80, 100, 30, cb_tip);

            Controls.Add(cb_tip);

            Label  lbkolicina  = new Label();
            LabelZ lb_kolicina = new LabelZ(130, 110, 300, 12, "Внесете количина", lbkolicina);

            Controls.Add(lbkolicina);

            TextBoxZ tb_kolicina = new TextBoxZ(130, 140, tbkolicina);

            Controls.Add(tbkolicina);

            Label  lb_cenakafe  = new Label();
            LabelZ lb_cena_kafe = new LabelZ(120, 170, 300, 12, "Внесете Цена на кафе", lb_cenakafe);

            Controls.Add(lb_cenakafe);

            TextBoxZ tb_cena = new TextBoxZ(130, 200, tbcena);

            Controls.Add(tbcena);

            Label  lbtezina  = new Label();
            LabelZ lb_tezina = new LabelZ(140, 230, 300, 12, "Внесете Грамажа", lbtezina);

            Controls.Add(lbtezina);

            TextBoxZ tbtezina = new TextBoxZ(130, 270, tb_tezina);

            Controls.Add(tb_tezina);


            ButtonZ bt_vnesi = new ButtonZ(130, 300, "Внеси", btvnesi);

            btvnesi.Click += new EventHandler(this.fvnesi);
            Controls.Add(btvnesi);

            ButtonZ bt_izlez = new ButtonZ(230, 300, "Излез", btizlez);

            btizlez.Click += new EventHandler(this.fizlez);
            Controls.Add(btizlez);

            conn.Open();
            SqlCommand command = conn.CreateCommand();

            command.CommandType = CommandType.Text;
            command.CommandText = "SELECT Ime FROM Podklasa WHERE (id_klasa = 2)";
            command.ExecuteNonQuery();
            DataTable      tb          = new DataTable();
            SqlDataAdapter dataAdapter = new SqlDataAdapter(command);

            dataAdapter.Fill(tb);
            foreach (DataRow dr in tb.Rows)
            {
                cb_tip.Items.Add(dr["Ime"].ToString());
            }
            conn.Close();
        }
        private void Vnesi_klient_Load(object sender, EventArgs e)
        {
            this.Width      = 500;
            this.Height     = 500;
            this.BackColor  = Color.FromArgb(255, 66, 66);
            this.Text       = "Внесување нов клиент";
            this.ControlBox = false;

            Label  lbn       = new Label();
            LabelZ lbnaslove = new LabelZ(100, 20, 280, 14, "Внесување на нов Клиент", lbn);

            lbn.Font = new Font("Roboto", 14, FontStyle.Underline);
            Controls.Add(lbn);

            Label  lb1   = new Label();
            LabelZ lbIme = new LabelZ(20, 70, 180, 12, "Внесете Име", lb1);

            Controls.Add(lb1);

            TextBoxZ tbIme = new TextBoxZ(210, 70, tb1);

            Controls.Add(tb1);

            Label  lb2       = new Label();
            LabelZ lbPrezime = new LabelZ(20, 120, 180, 12, "Внесете Презиме", lb2);

            Controls.Add(lb2);

            TextBoxZ tbPrezime = new TextBoxZ(210, 120, tb2);

            Controls.Add(tb2);



            Label  lb3       = new Label();
            LabelZ lbTelefon = new LabelZ(20, 170, 180, 12, "Внесете Телефон", lb3);

            Controls.Add(lb3);

            TextBoxZ tbTelefon = new TextBoxZ(210, 170, tb3);

            Controls.Add(tb3);

            Label  lb4    = new Label();
            LabelZ lbembg = new LabelZ(20, 220, 180, 12, "ЕМБГ", lb4);

            Controls.Add(lb4);

            TextBoxZ tbembg = new TextBoxZ(210, 220, tb4);

            Controls.Add(tb4);

            Label  lb5     = new Label();
            LabelZ lbemail = new LabelZ(20, 270, 180, 12, "Внесете Е-маил", lb5);

            Controls.Add(lb5);

            TextBoxZ tbe_email = new TextBoxZ(210, 270, tb5);

            Controls.Add(tb5);

            ButtonZ btVnesi = new ButtonZ(170, 320, "Внеси", bt);

            bt.Font   = new Font("Roboto", 10, FontStyle.Regular);
            bt.Click += new EventHandler(this.fvnesi);
            Controls.Add(bt);

            ButtonZ btizlez = new ButtonZ(280, 320, "Излез", bt1);

            bt1.Font   = new Font("Roboto", 10, FontStyle.Regular);
            bt1.Click += new EventHandler(this.fizlez);
            Controls.Add(bt1);


            LabelZ lbprikazi = new LabelZ(20, 370, 350, 12, "Податоците за клиентот се внесени", lb6);

            lb6.ForeColor = Color.Black;
            lb6.Hide();
            Controls.Add(lb6);
        }
Exemple #9
0
        private void Izveshtaj_Load(object sender, EventArgs e)
        {
            this.Width      = 640;
            this.Height     = 350;
            this.Text       = "Извештај";
            this.BackColor  = Color.FromArgb(244, 66, 66);
            this.ControlBox = false;

            RadioButtonZ rbvraboten = new RadioButtonZ(20, 50, 150, 40, "Вработен", 10, rbVraboten);

            rbVraboten.Click += new EventHandler(this.fprikazi);
            Controls.Add(rbVraboten);

            RadioButtonZ rbklient = new RadioButtonZ(20, 100, 150, 40, "Клиент", 10, rbKlient);

            rbKlient.Click += new EventHandler(this.fprikazi);
            Controls.Add(rbKlient);

            RadioButtonZ rbartikal = new RadioButtonZ(20, 150, 150, 40, "Артикал", 10, rbArtikal);

            rbArtikal.Click += new EventHandler(this.fprikazi);
            Controls.Add(rbArtikal);


            PictureBox logo = new PictureBox();

            logo.Width         = 300;
            logo.Height        = 150;
            logo.SizeMode      = PictureBoxSizeMode.StretchImage;
            logo.Location      = new Point(300, 50);
            logo.ImageLocation = "C:\\Users\\Mihajlo\\Desktop\\Proekt\\logo.png";
            Controls.Add(logo);

            ButtonZ btizlez = new ButtonZ(20, 200, "Излез", bt);

            bt.Click += new EventHandler(this.fizlez);
            Controls.Add(bt);

            /*ComboBoxZ cb_prikazi = new ComboBoxZ(20, 50, 150, 40, cbprikazi);
             * cbprikazi.Items.Add("Vraboten");
             * cbprikazi.Items.Add("Klient");
             * cbprikazi.Items.Add("Artikal");
             * cbprikazi.Click += new EventHandler(this.fprikazi);
             * Controls.Add(cbprikazi);
             *
             * dgvVraboten.Visible = false;
             * }
             * public void fprikazi(object sender, EventArgs e)
             * {
             * if (cbprikazi.SelectedIndex == 1)
             * {
             *  dgvVraboten.Visible = true;
             *
             *  dgvVraboten.Width = 555;
             *  dgvVraboten.Height = 140;
             *  dgvVraboten.Location = new Point(200, 20);
             *  dgvVraboten.ReadOnly = true;
             *  dgvVraboten.DataSource = bindingSource;
             *
             *  conn.Open();
             *  dataAdapter = new SqlDataAdapter("select id_vraboten AS РеденБрој, ime AS Име, prezime AS Презиме,telefon AS Телефон, EMBG AS ЕМБГ,mail AS Емаил from Vraboten", conn);
             *  SqlCommandBuilder cmd = new SqlCommandBuilder(dataAdapter);
             *  DataTable table1 = new DataTable();
             *  table1.Locale = System.Globalization.CultureInfo.InvariantCulture;
             *  dataAdapter.Fill(table1);
             *  dgvVraboten.DataSource = table1;
             *  Controls.Add(dgvVraboten);
             *  conn.Close();
             * }
             * }*/
        }
Exemple #10
0
        private void Prodazba_Load(object sender, EventArgs e)
        {
            this.Width      = 1050;
            this.Height     = 880;
            this.Text       = "Продажба";
            this.BackColor  = Color.FromArgb(244, 66, 66);
            this.ControlBox = false;



            //select Cena from Artikal where id_artikal=3
            conn.Open();
            string     query1 = "select max(br_faktura)+1 from Prodazba";
            SqlCommand cmd1   = new SqlCommand(query1, conn);

            cmd1.Parameters.AddWithValue("@redenbroj", tbvnesiredbroj.Text);
            //
            int brf = (int)cmd1.ExecuteScalar();

            conn.Close();



            Label  lbfaktura  = new Label();
            LabelZ lb_faktura = new LabelZ(600, 50, 180, 10, "Број на фактура:", lbfaktura);

            Controls.Add(lbfaktura);

            TextBoxZ tb_faktura = new TextBoxZ(790, 50, tbfaktura);

            tbfaktura.Text = brf.ToString();
            Controls.Add(tbfaktura);

            Label  lbprikazartikal  = new Label();
            LabelZ lbprikaz_artikal = new LabelZ(20, 20, 200, 12, "Приказ артикал: ", lbprikazartikal);

            Controls.Add(lbprikazartikal);

            dgvArtikal.Width    = 555;
            dgvArtikal.Height   = 140;
            dgvArtikal.Location = new Point(20, 50);
            dgvArtikal.ReadOnly = true;

            dgvArtikal.DataSource = bindingSource;
            conn.Open();
            dataAdapter = new SqlDataAdapter("select id_artikal AS РеденБрој, Ime AS Име, Tezina AS Тежина, Cena AS Цена,Kolicina AS Количина from Artikal ", conn);
            SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);
            DataTable         table          = new DataTable();

            table.Locale = System.Globalization.CultureInfo.InvariantCulture;
            dataAdapter.Fill(table);
            dgvArtikal.DataSource = table;
            Controls.Add(dgvArtikal);
            conn.Close();

            Label  lbvnesiredbroj  = new Label();
            LabelZ lbvnesi_redbroj = new LabelZ(20, 230, 200, 10, "Внесете реден број: ", lbvnesiredbroj);

            Controls.Add(lbvnesiredbroj);

            TextBoxZ tb_vnesiredbroj = new TextBoxZ(220, 230, tbvnesiredbroj);

            Controls.Add(tbvnesiredbroj);

            Label  lbklient  = new Label();
            LabelZ lb_klient = new LabelZ(20, 280, 200, 12, "Приказ клиент: ", lbklient);

            Controls.Add(lbklient);

            dgvKlient.Width    = 555;
            dgvKlient.Height   = 140;
            dgvKlient.Location = new Point(20, 310);
            dgvKlient.ReadOnly = true;

            dgvKlient.DataSource = bindingSource;
            conn.Open();
            dataAdapter = new SqlDataAdapter("select id_klient AS РеденБрој, Ime AS Име, Prezime AS Презиме,Telefon AS Телефон, EMBG AS ЕМБГ,Mail AS Емаил from Klient", conn);
            SqlCommandBuilder command = new SqlCommandBuilder(dataAdapter);
            DataTable         tb      = new DataTable();

            tb.Locale = System.Globalization.CultureInfo.InvariantCulture;
            dataAdapter.Fill(tb);
            dgvKlient.DataSource = tb;
            Controls.Add(dgvKlient);
            conn.Close();

            Label  lbrbklient  = new Label();
            LabelZ lb_rbklient = new LabelZ(20, 460, 200, 10, "Внесете реден број: ", lbrbklient);

            Controls.Add(lbrbklient);

            TextBoxZ tb_rbKlient = new TextBoxZ(220, 460, tbrbKlient);

            Controls.Add(tbrbKlient);

            Label  lbvraboten  = new Label();
            LabelZ lb_vraboten = new LabelZ(20, 500, 200, 12, "Приказ Вработен: ", lbvraboten);

            Controls.Add(lbvraboten);

            dgvVraboten.Width      = 555;
            dgvVraboten.Height     = 140;
            dgvVraboten.Location   = new Point(20, 540);
            dgvVraboten.ReadOnly   = true;
            dgvVraboten.DataSource = bindingSource;

            conn.Open();
            dataAdapter = new SqlDataAdapter("select id_vraboten AS РеденБрој, ime AS Име, prezime AS Презиме,telefon AS Телефон, EMBG AS ЕМБГ,mail AS Емаил from Vraboten", conn);
            SqlCommandBuilder cmd    = new  SqlCommandBuilder(dataAdapter);
            DataTable         table1 = new DataTable();

            table1.Locale = System.Globalization.CultureInfo.InvariantCulture;
            dataAdapter.Fill(table1);
            dgvVraboten.DataSource = table1;
            Controls.Add(dgvVraboten);
            conn.Close();

            Label  lbredbrVraboten  = new Label();
            LabelZ lb_redbrVraboten = new LabelZ(20, 690, 200, 12, "Внесете реден број: ", lbredbrVraboten);

            Controls.Add(lbredbrVraboten);

            TextBoxZ tb_redbrojVraboten = new TextBoxZ(220, 690, tbredbrojVraboten);

            Controls.Add(tbredbrojVraboten);

            Label  lbKolicina  = new Label();
            LabelZ lb_Kolicina = new LabelZ(20, 730, 200, 12, "Внесете количина: ", lbKolicina);

            Controls.Add(lbKolicina);

            TextBoxZ tb_vnesiKolicina = new TextBoxZ(220, 730, tbvnesiKolicina);

            Controls.Add(tbvnesiKolicina);

            Label  lbCena  = new Label();
            LabelZ lb_cena = new LabelZ(280, 770, 130, 12, "Приказ Цена: ", lbCena);

            Controls.Add(lbCena);

            TextBoxZ tb_cena = new TextBoxZ(420, 770, tbCena);

            Controls.Add(tbCena);

            ButtonZ btvnesi = new ButtonZ(20, 770, "Внеси", btVnesi);

            btVnesi.Click += new EventHandler(this.fvnesi);
            Controls.Add(btVnesi);

            ButtonZ btizlez = new ButtonZ(130, 770, "Излез", btIzlez);

            btIzlez.Click += new EventHandler(this.fizlez);
            Controls.Add(btIzlez);

            ButtonZ bt_potvrdi = new ButtonZ(75, 800, "Потврди", btpotvrdi);

            btpotvrdi.Click += new EventHandler(this.fpotvrdi);
            Controls.Add(btpotvrdi);

            PictureBox logo = new PictureBox();

            logo.Width         = 900;
            logo.Height        = 300;
            logo.SizeMode      = PictureBoxSizeMode.StretchImage;
            logo.Location      = new Point(600, 300);
            logo.ImageLocation = "C:\\Users\\Mihajlo\\Desktop\\Proekt\\logo.png";
            Controls.Add(logo);
        }
        private void Izmeni_Vraboten_Load(object sender, EventArgs e)
        {
            this.Width      = 1300;
            this.Height     = 500;
            this.BackColor  = Color.FromArgb(255, 66, 66);
            this.Text       = "Измени вработен";
            this.ControlBox = false;


            Label  lbn       = new Label();
            LabelZ lbnaslove = new LabelZ(100, 20, 280, 14, "Изменување на Вработен", lbn);

            lbn.Font = new Font("Roboto", 14, FontStyle.Underline);
            Controls.Add(lbn);

            dgvVraboten.Width    = 800;
            dgvVraboten.Height   = 200;
            dgvVraboten.Location = new Point(450, 70);

            dgvVraboten.DataSource = bindingSource;
            conn.Open();
            dataAdapter = new SqlDataAdapter("select id_vraboten AS РеденБрој, korisnicko_ime AS КорисничкоИме, ime AS Име, prezime AS Презиме,lozinka AS Лозинка,telefon AS Телефон, EMBG AS ЕМБГ,mail AS Емаил from Vraboten", conn);
            SqlCommandBuilder commandBuilder = new SqlCommandBuilder(dataAdapter);
            DataTable         table          = new DataTable();

            table.Locale = System.Globalization.CultureInfo.InvariantCulture;
            dataAdapter.Fill(table);
            dgvVraboten.DataSource = table;
            Controls.Add(dgvVraboten);
            conn.Close();


            Label  lb = new Label();
            LabelZ lbkorisnicko_ime = new LabelZ(20, 70, 180, 12, "Измени Корисничко име", lb);

            Controls.Add(lb);

            TextBoxZ tbkorisnicko_ime = new TextBoxZ(210, 70, tb);

            tb.Enabled = false;
            Controls.Add(tb);

            RadioButtonZ rb1 = new RadioButtonZ(420, 60, 15, 15, "", 10, rbkor_ime);

            rbkor_ime.Click += new EventHandler(this.fizbor);
            Controls.Add(rbkor_ime);

            /*           Label lb1 = new Label();
             *         LabelZ lbIme = new LabelZ(20, 120, 180, 12, "Измени Име", lb1);
             *         Controls.Add(lb1);
             *
             *         TextBoxZ tbIme = new TextBoxZ(210, 120, tb1);
             *         Controls.Add(tb1);
             */
            Label  lb2       = new Label();
            LabelZ lbPrezime = new LabelZ(20, 120, 180, 12, "Измени Презиме", lb2);

            Controls.Add(lb2);

            TextBoxZ tbPrezime = new TextBoxZ(210, 120, tb2);

            tb2.Enabled = false;
            Controls.Add(tb2);

            RadioButtonZ rb2 = new RadioButtonZ(420, 110, 15, 15, "", 10, rbprezime);

            rbprezime.Click += new EventHandler(this.fizbor);
            Controls.Add(rbprezime);

            Label  lb3       = new Label();
            LabelZ lbLozinka = new LabelZ(20, 170, 180, 12, "Измени Лозинка", lb3);

            Controls.Add(lb3);

            TextBoxZ tbLozinka = new TextBoxZ(210, 170, tb3);

            tb3.Enabled = false;
            Controls.Add(tb3);

            RadioButtonZ rb3 = new RadioButtonZ(420, 160, 15, 15, "", 10, rblozinka);

            rblozinka.Click += new EventHandler(this.fizbor);
            Controls.Add(rblozinka);

            Label  lb4       = new Label();
            LabelZ lbTelefon = new LabelZ(20, 220, 180, 12, "Измени Телефон", lb4);

            Controls.Add(lb4);

            TextBoxZ tbTelefon = new TextBoxZ(210, 220, tb4);

            tb4.Enabled = false;
            Controls.Add(tb4);

            RadioButtonZ rb4 = new RadioButtonZ(420, 210, 15, 15, "", 10, rbtelefon);

            rbtelefon.Click += new EventHandler(this.fizbor);
            Controls.Add(rbtelefon);

            /*           Label lb5 = new Label();
             *         LabelZ lbembg = new LabelZ(20, 320, 180, 12, "Измени ЕМБГ", lb5);
             *         Controls.Add(lb5);
             *
             *         TextBoxZ tbembg = new TextBoxZ(210, 320, tb5);
             *         Controls.Add(tb5);
             */
            Label  lb6     = new Label();
            LabelZ lbemail = new LabelZ(20, 270, 180, 12, "Измени Е-маил", lb6);

            Controls.Add(lb6);

            TextBoxZ tbe_email = new TextBoxZ(210, 270, tb6);

            tb6.Enabled = false;
            Controls.Add(tb6);

            RadioButtonZ rb5 = new RadioButtonZ(420, 260, 15, 15, "", 10, rbemail);

            rbemail.Click += new EventHandler(this.fizbor);
            Controls.Add(rbemail);

            Label  lb7     = new Label();
            LabelZ lbizbor = new LabelZ(500, 320, 180, 10, "Внесете ред. број", lb7);

            Controls.Add(lb7);

            TextBoxZ tbizbor = new TextBoxZ(500, 350, tb1);

            Controls.Add(tb1);

            ButtonZ btIzmeni = new ButtonZ(100, 320, "Измени", bt);

            bt.Click += new EventHandler(this.fizmeni);
            Controls.Add(bt);

            ButtonZ btIzlez = new ButtonZ(250, 320, "Излез", bt_izlez);

            bt_izlez.Click += new EventHandler(this.fizlez);
            Controls.Add(bt_izlez);
        }