Ejemplo n.º 1
0
 public DonHangBBDTO(DonHangBBDTO x)
 {
     this.madh     = x.madh;
     this.tensp    = x.tensp;
     this.sdt      = x.sdt;
     this.tennv    = x.tennv;
     this.tenkh    = x.tenkh;
     this.ngaylap  = x.ngaylap;
     this.sl       = x.sl;
     this.tongtien = x.tongtien;
     this.gia      = x.gia;
     this.diachi   = x.diachi;
 }
Ejemplo n.º 2
0
 public DonHangBBDTO this[string id]
 {
     get
     {
         DonHangBBDTO people = list.Find(x => x.Madh == id);
         if (people is null)
         {
             people       = new DonHangBBDTO();
             people.Tenkh = "<Không tìm thấy>";
         }
         return(people);
     }
 }
Ejemplo n.º 3
0
        public void GetFullInfo(string danhsach = "ListDHBB")
        {
            list.Clear();
            try
            {
                DataTable ds = DataProvider.Instance.ExecuteQuery(danhsach);
                for (int i = 0; i < ds.Rows.Count; i++)
                {
                    DonHangBBDTO people;
                    DateTime     ngaynhap = Convert.ToDateTime(ds.Rows[i]["NgayNhap"]);
                    //DateTime ngaysinh = Convert.ToDateTime(ds.Rows[i]["NgaySinh"]);
                    double a = Convert.ToDouble(ds.Rows[i]["ThanhTien"]);
                    double b = Convert.ToDouble(ds.Rows[i]["GiaTien"]);
                    people = new DonHangBBDTO(ds.Rows[i]["MaDH"].ToString(), ds.Rows[i]["TenSP"].ToString(), ds.Rows[i]["SDT"].ToString(), ds.Rows[i]["TenKH"].ToString(), ngaynhap, (int)ds.Rows[i]["SL"], b, a, ds.Rows[i]["TenNV"].ToString(), ds.Rows[i]["DiaChi"].ToString());

                    Add(people);
                }
            }
            catch { }
        }
Ejemplo n.º 4
0
 public void Add(DonHangBBDTO x)
 {
     list.Add(x);
 }