void SelectChiTietPhieuTTCuaKH() { try { Server_Client.Client cl = new Server_Client.Client(); // gán TCPclient this.client1 = cl.Connect(Luu.IP, Luu.Ports); // khởi tạo biến truyền vào với hàm khởi tạo Entities.ChiTietPhieuTTCuaKH pt = new Entities.ChiTietPhieuTTCuaKH("SelectAll"); // khởi tạo mảng đối tượng để hứng giá trị Entities.ChiTietPhieuTTCuaKH[] pt1 = new Entities.ChiTietPhieuTTCuaKH[1]; clientstrem = cl.SerializeObj(this.client1, "ChiTietPhieuTTCuaKH", pt); // đổ mảng đối tượng vào datagripview pt1 = (Entities.ChiTietPhieuTTCuaKH[])cl.DeserializeHepper1(clientstrem, pt1); if (pt1 == null) { ctpttkh = new Entities.ChiTietPhieuTTCuaKH[0]; return; } ctpttkh = new Entities.ChiTietPhieuTTCuaKH[pt1.Length]; for (int i = 0; i < pt1.Length; i++) { ctpttkh[i] = pt1[i]; } } catch { ctpttkh = new Entities.ChiTietPhieuTTCuaKH[0]; } }
public Entities.ChiTietPhieuTTCuaKH[] ChiTietPhieuTTCuaKH() { Entities.ChiTietPhieuTTCuaKH[] ctpttckh1 = new BizLogic.ChiTietPhieuTTCuaKH().Select(); if (ctpttckh1 == null) { ctpttckh1 = new Entities.ChiTietPhieuTTCuaKH[0]; } return(ctpttckh1); }
private void SelectChiTietPhieuTTCuaKH() { try { if (chitietphieuttcuakh == null || chitietphieuttcuakh.Length == 0) { chitietphieuttcuakh = new Entities.ChiTietPhieuTTCuaKH[0]; return; } Entities.ChiTietPhieuTTCuaKH[] pt2 = new Entities.ChiTietPhieuTTCuaKH[chitietphieuttcuakh.Length]; int sotang = 0; for (int j = 0; j < chitietphieuttcuakh.Length; j++) { if (chitietphieuttcuakh[j].Deleted == false) { pt2[sotang] = chitietphieuttcuakh[j]; sotang++; } } chitietphieuttcuakh = new Entities.ChiTietPhieuTTCuaKH[sotang]; if (sotang != 0) { for (int j = 0; j < sotang; j++) { chitietphieuttcuakh[j] = pt2[j]; } } else { chitietphieuttcuakh = new Entities.ChiTietPhieuTTCuaKH[0]; } } catch { } finally { } }
private void SelectChiTietPhieuTTCuaKH() { try { if (chitietphieuttcuakh == null || chitietphieuttcuakh.Length == 0) { chitietphieuttcuakh = new Entities.ChiTietPhieuTTCuaKH[0]; return; } Entities.ChiTietPhieuTTCuaKH[] pt2 = new Entities.ChiTietPhieuTTCuaKH[chitietphieuttcuakh.Length]; int sotang = 0; for (int j = 0; j < chitietphieuttcuakh.Length; j++) { if (chitietphieuttcuakh[j].Deleted == false) { pt2[sotang] = chitietphieuttcuakh[j]; sotang++; } } chitietphieuttcuakh = new Entities.ChiTietPhieuTTCuaKH[sotang]; if (sotang != 0) { for (int j = 0; j < sotang; j++) { chitietphieuttcuakh[j] = pt2[j]; } } else chitietphieuttcuakh = new Entities.ChiTietPhieuTTCuaKH[0]; } catch { } finally { } }
public Entities.ChiTietPhieuTTCuaKH[] ChiTietPhieuTTCuaKH() { Entities.ChiTietPhieuTTCuaKH[] ctpttckh1 = new BizLogic.ChiTietPhieuTTCuaKH().Select(); if (ctpttckh1 == null) ctpttckh1 = new Entities.ChiTietPhieuTTCuaKH[0]; return ctpttckh1; }