Exemple #1
0
        void loadData()
        {
            Purchase.database.discountData dis = new Purchase.database.discountData();
            dis.FnConn();
            DataTable dt = dis.FillData("productdetails", "");

            if (dt.Rows.Count > 0)
            {
                gridControl1.DataSource = dt;
            }
            dis.FnTrans();
        }
        private void Product_for_Discount_Load(object sender, EventArgs e)
        {
            Test.Purchase.database.discountData dis = new Purchase.database.discountData();
            dis.FnConn();
            DataTable dt = dis.FillData("products", no);

            if (dt.Rows.Count > 0)
            {
                txtPCode.Text       = dt.Rows[0]["productCode"] + "";
                txtDescription.Text = dt.Rows[0]["itemName"] + "";
                txtSalesRate.Text   = dt.Rows[0]["salesRate1"] + "";
            }
        }