Пример #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            if ((textBox12.Text == "") || (textBox13.Text == "") || (textBox16.Text == "") || (textBox15.Text == "") || (textBox19.Text == "") || (textBox17.Text == ""))
            {
                MessageBox.Show("All the fields must be Filled");
            }
            else
            {
                int textBox122 = int.Parse(textBox12.Text);

                SupplierDBConnection suppDb = new SupplierDBConnection();

                suppDb.Delete(textBox122);
                clearItem();
            }
        }
Пример #2
0
        private void Admin_Load(object sender, EventArgs e)
        {
            //-------------------Danusha Tharanga--------------------------------2/19/2014---------------------------
            if (storekeeper_name == "Storekeeper")
            {
                adminTabPg.TabPages.Remove(Items);
                adminTabPg.TabPages.Remove(Users);
                adminTabPg.TabPages.Remove(Report);
                adminTabPg.TabPages.Remove(Supplier);
            }
            //-------------------------------------------------------------------------------------------------------
            //-------------------Dilanka Rathnayaka------------------------------2/9/2014----------------------------
            Reports rep = new Reports();

            //set dates
            rep.FormLoadDateTimePicker(dateTimePicker1, dateTimePicker2);
            //Set Cashier names to combo box
            rep.FormLoadComboBox(comboBox1, comboBox2);
            //-------------------------------------------------------------------------------------------------------

            //-------------------Ravisha Weerasekara------------------------------2/7/2014----------------------------
            KeyPressEvent kpe = new KeyPressEvent();

            kpe.manualBilling("admin", "", this, "itm");
            kpe.manualBilling("admin", "", this, "usrs");
            kpe.manualBilling("admin", "", this, "qty");
            kpe.manualBilling("admin", "", this, "sup");

            this.KeyPreview            = true;
            this.textBox6.KeyDown     += new KeyEventHandler(textBox6_KeyDown);
            this.textBox24.KeyDown    += new KeyEventHandler(textBox24_KeyDown);
            this.txtBoxSearch.KeyDown += new KeyEventHandler(txtBoxSearch_KeyDown);
            this.textBox18.KeyDown    += new KeyEventHandler(textBox18_KeyDown);

            //-------------------------------------------------------------------------------------------------------

            //---------------------------Aruna Udayana - supplier tab form_Load   ----------------------------------
            SupplierDBConnection supp = new SupplierDBConnection();

            supp.search(dataGridView4);
            //---------------------------------------------------------------------------

            ReorderForm reorder = new ReorderForm();

            reorder.reorderLevel(this, Reorder);
        }
Пример #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            if ((textBox12.Text == "") || (textBox13.Text == "") || (textBox16.Text == "") || (textBox15.Text == "") || (textBox19.Text == "") || (textBox17.Text == ""))
            {
                MessageBox.Show("All the fields must be Filled");
            }
            else
            {
                int    textBox122 = int.Parse(textBox12.Text);
                string textBox133 = textBox13.Text;
                string textBox166 = textBox16.Text;
                int    textBox155 = int.Parse(textBox15.Text);
                string textBox199 = textBox19.Text;
                string textBox177 = textBox17.Text;

                SupplierDBConnection suppDb = new SupplierDBConnection();


                suppDb.Update(textBox122, textBox133, textBox166, textBox155, textBox199, textBox177);
                clearItem();
            }
        }
Пример #4
0
        private void button8_Click(object sender, EventArgs e) // search supplier
        {
            SupplierDBConnection supp = new SupplierDBConnection();

            supp.search(dataGridView4);
        }
Пример #5
0
        private void textBox18_KeyPress(object sender, KeyPressEventArgs e) //keypress supplier search
        {
            SupplierDBConnection supp = new SupplierDBConnection();

            supp.keyPress_SupplierSearch(textBox18, dataGridView4);
        }