private void textBox1_TextChanged(object sender, EventArgs e)
        {
            connection CN = new connection();

            CN.thisConnection.Open();

            OracleCommand thisCommand = CN.thisConnection.CreateCommand();

            textBox2.Text = "";
            textBox3.Text = "";

            thisCommand.CommandText =
                "SELECT * FROM member where id = '" + textBox1.Text + "'";

            OracleDataReader thisReader = thisCommand.ExecuteReader();


            while (thisReader.Read())
            {
                textBox2.Text = thisReader["name"].ToString();
                textBox3.Text = thisReader["cash"].ToString();


                try
                {
                    // string filePath = thisReader["picture"].ToString();
                    // this.pb_profilepics.Image = Image.FromFile(filePath);
                }
                catch
                { MessageBox.Show("Failure"); }
            }
            CN.thisConnection.Close();
        }
Exemple #2
0
        public void update_stock()
        {
            connection con = new connection();
            string     ConnectionString = con.ConnectionString;

            OleDbConnection conn = new OleDbConnection(ConnectionString);
            OleDbCommand    comm = new OleDbCommand(@"UPDATE stock
                                                   SET receive_qty = @receive_qty
                                                  WHERE item_code = @item_code", conn);

            comm.Parameters.AddWithValue("@receive_qty", invoice.qty);
            comm.Parameters.AddWithValue("@item_code", invoice.code);


            try
            {
                conn.Open();
                comm.ExecuteNonQuery();
            }
            catch (Exception tp)
            {
                MessageBox.Show("update stock" + tp);
            }
            finally
            {
                conn.Close();
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            connection sv = new connection();

            sv.thisConnection.Open();

            OracleCommand thisCommand = sv.thisConnection.CreateCommand();

            thisCommand.CommandText =
                "update member set name = '" + textBox2.Text + "',cash='" + textBox3.Text + "'  where id= '" + textBox1.Text + "'";

            thisCommand.Connection  = sv.thisConnection;
            thisCommand.CommandType = CommandType.Text;
            //For Insert Data Into Oracle//
            try
            {
                thisCommand.ExecuteNonQuery();
                MessageBox.Show("Updated");
                this.Hide();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            sv.thisConnection.Close();
            this.Close();

            Form1 ob = new Form1();

            ob.Show();
        }
Exemple #4
0
        public sales_return_print()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
        }
Exemple #5
0
        public void getstock()
        {
            connection con = new connection();
            string     ConnectionString = con.ConnectionString;

            string          strsql = "select * from stock where  (item_code = @id)";
            OleDbConnection conn   = new OleDbConnection(ConnectionString);
            OleDbCommand    cmd    = new OleDbCommand(strsql, conn);

            cmd.Parameters.AddWithValue("@id", invoice.code.ToString());

            try
            {
                conn.Open();
                OleDbDataReader reader = cmd.ExecuteReader();

                if (reader.Read())
                {
                    stock = Convert.ToInt32(reader["receive_qty"].ToString());
                }
            }
            catch (Exception tp)
            {
                MessageBox.Show("" + tp);
            }
            finally
            {
                conn.Close();
            }
        }
Exemple #6
0
        private void Form1_Load(object sender, EventArgs e)
        {
            connection CN = new connection();

            CN.thisConnection.Open();

            OracleCommand thisCommand = CN.thisConnection.CreateCommand();

            thisCommand.CommandText =
                "SELECT * FROM member ";

            OracleDataReader thisReader = thisCommand.ExecuteReader();

            ct = 0;

            while (thisReader.Read())
            {
                ListViewItem lsvItem = new ListViewItem(thisReader["name"].ToString());

                ct++;

                lsvItem.SubItems.Add(thisReader["cash"].ToString());
                listView1.Items.Add(lsvItem);
            }


            CN.thisConnection.Close();

            label1.Text = ct.ToString();
        }
        public change_pass()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
        }
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            listView1.Items.Clear();
            connection CN = new connection();

            CN.thisConnection.Open();

            OracleCommand thisCommand = CN.thisConnection.CreateCommand();

            thisCommand.CommandText =
                "SELECT * FROM member ";

            OracleDataReader thisReader = thisCommand.ExecuteReader();



            while (thisReader.Read())
            {
                ListViewItem lsvItem = new ListViewItem(thisReader["name"].ToString());
                lsvItem.SubItems.Add(thisReader["id"].ToString());
                lsvItem.SubItems.Add(label1.Text);
                lsvItem.SubItems.Add(textBox1.Text);

                listView1.Items.Add(lsvItem);
            }
            CN.thisConnection.Close();
        }
        public invoice_print()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
        }
Exemple #10
0
        public stock_receipt_print()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
        }
        public p_order_print()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
        }
Exemple #12
0
        private void addbalance_Load(object sender, EventArgs e)
        {
            textBox4.Enabled = false;
            connection CN = new connection();

            CN.thisConnection.Open();

            OracleCommand thisCommand = CN.thisConnection.CreateCommand();

            thisCommand.CommandText =
                "SELECT * FROM member ";

            OracleDataReader thisReader = thisCommand.ExecuteReader();


            while (thisReader.Read())
            {
                ListViewItem lsvItem = new ListViewItem(thisReader["name"].ToString());
                lsvItem.SubItems.Add(thisReader["id"].ToString());
                lsvItem.SubItems.Add(thisReader["cash"].ToString());

                listView1.Items.Add(lsvItem);
            }


            CN.thisConnection.Close();
        }
Exemple #13
0
        public item_a()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
        }
Exemple #14
0
        private void dailymeal_Load(object sender, EventArgs e)
        {
            //meal table
            connection cd = new connection();

            cd.thisConnection.Open();

            OracleCommand thisCommand1 = cd.thisConnection.CreateCommand();

            thisCommand1.CommandText =
                "SELECT * FROM meal ";

            OracleDataReader thisReader1 = thisCommand1.ExecuteReader();

            Boolean x;

            if (x = thisReader1.Read())
            {
                while (thisReader1.Read())
                {
                    daycount = Convert.ToInt32(thisReader1["day"].ToString());
                }


                cd.thisConnection.Close();
                daycount++;
            }
            else
            {
                daycount = 1;
            }


            label1.Text = daycount.ToString();
/// member table
            connection CN = new connection();

            CN.thisConnection.Open();

            OracleCommand thisCommand = CN.thisConnection.CreateCommand();

            thisCommand.CommandText =
                "SELECT * FROM member ";

            OracleDataReader thisReader = thisCommand.ExecuteReader();



            while (thisReader.Read())
            {
                ListViewItem lsvItem = new ListViewItem(thisReader["name"].ToString());
                lsvItem.SubItems.Add(thisReader["id"].ToString());
                lsvItem.SubItems.Add(label1.Text);
                lsvItem.SubItems.Add(textBox1.Text);

                listView1.Items.Add(lsvItem);
            }
            CN.thisConnection.Close();
        }
Exemple #15
0
        public stockissue()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            gridview();
        }
Exemple #16
0
        public group()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            grid();
        }
Exemple #17
0
        public i_b_m_s()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            gridview();
        }
Exemple #18
0
        public payment_due_list()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            grid();
        }
Exemple #19
0
        public due_invoice()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            gridview();
        }
Exemple #20
0
        public taxsetup()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            BindGrid();
        }
Exemple #21
0
        public Form1()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            textbox();
        }
Exemple #22
0
        public sales_retuen_issue()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            gridview();
        }
Exemple #23
0
        public sale_item()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            grid();
        }
Exemple #24
0
        public city()
        {
            InitializeComponent();
            this.AutoValidate = System.Windows.Forms.AutoValidate.Disable;
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            gridview();
        }
Exemple #25
0
        public payment_re()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            grid();
            dateTimePicker1.Value = DateTime.Now;
            dateTimePicker2.Value = DateTime.Now;
            reecipt();
        }
Exemple #26
0
        public p_order()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;

            gridview();
            dateTimePicker1.Value = DateTime.Now.Date;
            dateTimePicker2.Value = DateTime.Now.Date;
        }
Exemple #27
0
        public stock_r_n()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            grid();
            dateTimePicker1.Value = DateTime.Now;
            dateTimePicker2.Value = DateTime.Now;
            dateTimePicker3.Value = DateTime.Now;
        }
Exemple #28
0
        public invoice()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            grid();
            dateTimePicker1.Value = DateTime.Now;
            dateTimePicker2.Value = DateTime.Now;
            getid();
        }
Exemple #29
0
        private void button1_Click(object sender, EventArgs e)
        {
            /////
            for (int x = 0; x < listView1.Items.Count; x++)
            //    ListView1.Items.Count - 1; x++)
            {
                connection sv = new connection();
                sv.thisConnection.Open();

                OracleDataAdapter thisAdapter = new OracleDataAdapter("SELECT * FROM meal", sv.thisConnection);

                OracleCommandBuilder thisBuilder = new OracleCommandBuilder(thisAdapter);

                DataSet thisDataSet = new DataSet();
                thisAdapter.Fill(thisDataSet, "meal");

                DataRow thisRow = thisDataSet.Tables["meal"].NewRow();
                try
                {
                    //MessageBox.Show(listView1.Items[x].SubItems[0].Text);


                    thisRow["id"]   = listView1.Items[x].SubItems[1].Text;
                    thisRow["name"] = listView1.Items[x].SubItems[0].Text;
                    thisRow["day"]  = listView1.Items[x].SubItems[2].Text;
                    thisRow["meal"] = listView1.Items[x].SubItems[3].Text;


                    thisDataSet.Tables["meal"].Rows.Add(thisRow);



                    thisAdapter.Update(thisDataSet, "meal");
                }



                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                sv.thisConnection.Close();
            }


            //////

            MessageBox.Show("Submitted");
            Form1 ob = new Form1();

            ob.Show();
            this.Hide();
        }
Exemple #30
0
        public sales_order()
        {
            InitializeComponent();
            connection con = new connection();

            connection.ConnectionString = con.ConnectionString;
            grid();
            dateTimePicker1.Value = DateTime.Now;
            dateTimePicker3.Value = DateTime.Now;
            dateTimePicker4.Value = DateTime.Now;
            getid();
        }