private void Submit_Click(object sender, EventArgs e)
        {
            bill bil = new bill();

            bil.fill(this, custmer);
            Submit_make_order_Customer sub = new Submit_make_order_Customer();

            sub.Show();
        }
Example #2
0
        public void calc_new_Price(Return_Product_Form re)
        {
            bill bil = new bill();
            OracleDataAdapter adaptt;
            DataSet           dataStt;
            string            constrr = "data source = orcl; user id = hr; password=hr;";
            string            produtt = "select PRICE from PRODUCT where P_NAME='" + re.textBox_product_name.Text.ToString() + "'";

            adaptt  = new OracleDataAdapter(produtt, constrr);
            dataStt = new DataSet();
            adaptt.Fill(dataStt);
            /////////////////////////////////////////////////
            OracleDataAdapter adapttr;
            DataSet           dataSstt;
            string            consttrr = "data source = orcl; user id = hr; password=hr;";
            string            produut  = "select TOTAL_PRICE from BILL where BILL_ID= " + int.Parse(re.Select_Bill_ID_for_return_bill.SelectedItem.ToString());

            adapttr  = new OracleDataAdapter(produut, consttrr);
            dataSstt = new DataSet();
            adapttr.Fill(dataSstt);
            /////////////////////////////////////////////////////////

            float Totalprice = float.Parse(dataSstt.Tables[0].Rows[0]["TOTAL_PRICE"].ToString()) - float.Parse(dataStt.Tables[0].Rows[0]["PRICE"].ToString());

            bil.setTotle_price(Totalprice);

            //////////////////////////////////////////////////

            OracleDataAdapter adapt;
            DataSet           dataSt;

            string constttrr = "data source = orcl; user id = hr; password=hr;";
            string prod      = "update BILL set TOTAL_PRICE = " + bil.getTotle_price() + " where BILL_ID =" + int.Parse(re.Select_Bill_ID_for_return_bill.SelectedItem.ToString());

            adapt  = new OracleDataAdapter(prod, constttrr);
            dataSt = new DataSet();
            adapt.Fill(dataSt);
        }