Ejemplo n.º 1
0
        public List <CTHDGoiChup> GetCTHDGoichupListDetail()
        {
            List <CTHDGoiChup> list  = new List <CTHDGoiChup>();
            DataTable          table = DataProvider.Instance.ExecuteQuery("select * from CTHD_GOICHUP");

            foreach (DataRow row in table.Rows)
            {
                CTHDGoiChup ct = new CTHDGoiChup(row);
                list.Add(ct);
            }
            return(list);
        }
Ejemplo n.º 2
0
        public List <CTHDGoiChup> GetCTHDGoiChupListByMaHD(int mahd)
        {
            List <CTHDGoiChup> list  = new List <CTHDGoiChup>();
            DataTable          table = DataProvider.Instance.ExecuteQuery(string.Format("select CTHD_GOICHUP.* from CTHD_GOICHUP, HOADON where CTHD_GOICHUP.MaHD= HOADON.MaHD and CTHD_GOICHUP.MaHD={0}", mahd));

            foreach (DataRow row in table.Rows)
            {
                CTHDGoiChup ct = new CTHDGoiChup(row);
                list.Add(ct);
            }
            return(list);
        }
Ejemplo n.º 3
0
        private void cbbMaCTGC_SelectedIndexChanged(object sender, EventArgs e)
        {
            var mactgc = (cbbMaCTGC.SelectedItem as CTHDGoiChup).MaCTGC;

            _CTgoichup          = CTHDGoiChupDAO.Instance.GetCTgoichupByMaCTGC(mactgc);
            txtMaGC.Text        = _CTgoichup.MaGoiChup.ToString();
            txtDiadiem.Text     = GoiChupDAO.Instance.getDiadiemByMagoichup(_CTgoichup.MaGoiChup).ToString();
            txtGiagoichup.Text  = _CTgoichup.GiaTien.ToString();
            dtimeNgaychup.Value = _CTgoichup.NgayChup;
            _hoadon             = HoaDonDAO.Instance.GetHoadonByMaHD(_CTgoichup.MaHD);
            txtMaHD.Text        = _hoadon.MaHD.ToString();
            txtTenKH.Text       = _hoadon.TenKH.ToString();
            txtSDT.Text         = _hoadon.SDT.ToString();
            LoadAlbumByMaCTGC((cbbMaCTGC.SelectedItem as CTHDGoiChup).MaCTGC);
        }