Beispiel #1
0
        public void tinhtien(int id)
        {
            Dsmonans ds = new Dsmonans();

            giatien = 0;
            List <DataRow> list = ds.show_dsmonan(id_hoadon).AsEnumerable().ToList();

            foreach (var item in list)
            {
                giatien = giatien + int.Parse(item[1].ToString()) * int.Parse(item[2].ToString());
            }
            txt_thanhtien.Text = giatien.ToString() + " VNĐ ";
        }
Beispiel #2
0
        public void load_dsmonan(int id, int soban, string tenkh)
        {
            data_dsmonan.RowHeadersVisible = false;
            Dsmonans ds = new Dsmonans();

            txt_thanhtien.Text      = giatien.ToString();
            data_dsmonan.DataSource = ds.show_dsmonan(id);
            id_hoadon    = id;
            sobanan      = soban;
            tenkhachhang = tenkh;
            enable_control(false);
            null_data_control();
            tinhtien(id);
        }