本文整理汇总了C#中Server_Client.Client.DeserializeHepper1方法的典型用法代码示例。如果您正苦于以下问题:C# Server_Client.Client.DeserializeHepper1方法的具体用法?C# Server_Client.Client.DeserializeHepper1怎么用?C# Server_Client.Client.DeserializeHepper1使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server_Client.Client
的用法示例。
在下文中一共展示了Server_Client.Client.DeserializeHepper1方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: checkConflict
public void checkConflict()
{
Server_Client.Client client = new Server_Client.Client();
this.tcpClient = client.Connect(Luu.IP, Luu.Ports);
Entities.LoaiHangHoa lhh = new Entities.LoaiHangHoa("Select");
Entities.LoaiHangHoa[] lhh1 = new Entities.LoaiHangHoa[1];
networkStream = client.SerializeObj(this.tcpClient, "NhanVien", lhh);
lhh1 = (Entities.LoaiHangHoa[])client.DeserializeHepper1(networkStream, lhh1);
if (lhh1 != null)
{
for (int j = 0; j < lhh1.Length; j++)
{
if (lhh1[j].MaLoaiHang == txtTenLoaiHang.Text)
{
MessageBox.Show("Thất bại");
chck = "No";
txtTenLoaiHang.Text = new Common.Utilities().ProcessID(txtTenLoaiHang.Text);
break;
}
else
chck = "Yes";
}
}
}
示例2: checkConflict
public void checkConflict()
{
Server_Client.Client client= new Server_Client.Client();
this.tcpClient = client.Connect(Luu.IP, Luu.Ports);
Entities.KhoHang kh = new Entities.KhoHang("Select");
Entities.KhoHang[] kh1 = new Entities.KhoHang[1];
networkStream = client.SerializeObj(this.tcpClient, "KhoHang", kh);
kh1 = (Entities.KhoHang[])client.DeserializeHepper1(networkStream, kh1);
if (kh1 != null)
{
for (int j = 0; j < kh1.Length; j++)
{
if (kh1[j].MaKho == txtMaKho.Text)
{
MessageBox.Show("Thất bại");
chck = "No";
txtMaKho.Text = new Common.Utilities().ProcessID(txtMaKho.Text);
break;
}
else
chck = "Yes";
}
}
}
示例3: SelectData1
public Entities.BaoCaoNhapHangTheoNhomHang[] SelectData1()
{
Entities.BaoCaoNhapHangTheoNhomHang[] nkh1 = new Entities.BaoCaoNhapHangTheoNhomHang[1];
try
{
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.BaoCaoNhapHangTheoNhomHang nkh = new Entities.BaoCaoNhapHangTheoNhomHang();
// truyền HanhDong
Entities.TruyenGiaTri truyen = new Entities.TruyenGiaTri("Select");
// khởi tạo mảng đối tượng để hứng giá trị
clientstrem = cl.SerializeObj(this.client1, "BaoCaoNhapHangTheoNhomHang", truyen);
// đổ mảng đối tượng vào datagripview
nkh1 = (Entities.BaoCaoNhapHangTheoNhomHang[])cl.DeserializeHepper1(clientstrem, nkh1);
Entities.BaoCaoNhapHangTheoNhomHang[] nkh3 = new Entities.BaoCaoNhapHangTheoNhomHang[nkh1.Length];
Common.Utilities a = new Common.Utilities();
}
catch (Exception ex)
{
MessageBox.Show("Không kết nối được với server - thử lại sau");
}
return nkh1;
}
示例4: LayDL
void LayDL()
{
try
{
cl = new Server_Client.Client();
// gán TCPclient
this.client1 = cl.Connect(Luu.IP, Luu.Ports);
//truyền giá trị lên server
clientstrem = cl.SerializeObj(this.client1, "LayBackUp", null);
// đổ mảng đối tượng vào datagripview
slht = (Entities.SaoLuuHeThong[])cl.DeserializeHepper1(clientstrem, null);
if (slht != null)
{
if (slht.Length > 0)
{
dgvHienThi.DataSource = slht;
}
}
else
{
slht = new Entities.SaoLuuHeThong[0];
dgvHienThi.DataSource = slht;
}
fix();
}
catch
{
dgvHienThi.DataSource = new Entities.SaoLuuHeThong[0];
fix();
}
dgvHienThi.Refresh();
}
示例5: SelectData
/// <summary>
/// select dữ liệu từ server
/// </summary>
public void SelectData()
{
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.NhanVien ncc = new Entities.NhanVien("Select");
// khởi tạo mảng đối tượng để hứng giá trị
Entities.NhanVien[] ncc1 = new Entities.NhanVien[1];
clientstrem = cl.SerializeObj(this.client1, "NhanVien", ncc);
// đổ mảng đối tượng vào datagripview
ncc1 = (Entities.NhanVien[])cl.DeserializeHepper1(clientstrem, ncc1);
if (ncc1 == null)
{
hienthi = new Entities.NhanVien[0];
dtgvncc.DataSource = new Entities.NhanVien[0];
return;
}
Entities.NhanVien[] ncc2 = new Entities.NhanVien[ncc1.Length];
int sotang = 0;
for (int j = 0; j < ncc1.Length; j++)
{
if (ncc1[j].Deleted == false)
{
ncc2[sotang] = ncc1[j];
sotang++;
}
}
hienthi = new Entities.NhanVien[sotang];
if (sotang != 0)
{
for (int j = 0; j < sotang; j++)
{
hienthi[j] = ncc2[j];
}
}
else
{
hienthi = new Entities.NhanVien[0];
dtgvncc.DataSource = new Entities.NhanVien[0];
return;
}
dtgvncc.DataSource = hienthi;
dtgvncc.Rows[0].Selected = true;
}
catch (Exception ex)
{
}
finally
{
fix();
}
}
示例6: Select
public void Select()
{
try
{
dtgvHienThi.RowHeadersVisible = false;
Server_Client.Client cl = new Server_Client.Client();
cl = new Server_Client.Client();
this.client1 = cl.Connect(Luu.IP, Luu.Ports);
Entities.CheckRefer ctxh = new Entities.CheckRefer("NH");
clientstrem = cl.SerializeObj(this.client1, "Select", ctxh);
Entities.NhomHang[] kh1 = new Entities.NhomHang[0];
kh1 = (Entities.NhomHang[])cl.DeserializeHepper1(clientstrem, kh1);
if (kh1 == null)
{
hienthi = new Entities.NhomHang[0];
dtgvHienThi.DataSource = new Entities.NhomHang[0];
return;
}
Entities.NhomHang[] ncc2 = new Entities.NhomHang[kh1.Length];
int sotang = 0;
for (int j = 0; j < kh1.Length; j++)
{
if (kh1[j].Deleted == false)
{
ncc2[sotang] = kh1[j];
sotang++;
}
}
hienthi = new Entities.NhomHang[sotang];
if (sotang != 0)
{
for (int j = 0; j < sotang; j++)
{
hienthi[j] = ncc2[j];
}
}
else
{
hienthi = new Entities.NhomHang[0];
dtgvHienThi.DataSource = new Entities.NhomHang[0];
return;
}
dtgvHienThi.DataSource = hienthi;
dtgvHienThi.Rows[0].Selected = true;
}
catch (Exception ex)
{
}
finally
{
fix();
}
}
示例7: SelectData
/// <summary>
/// select dữ liệu từ server
/// </summary>
public void SelectData()
{
try
{
dtgvKH.RowHeadersVisible = false;
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.DonDatHang kh = new Entities.DonDatHang("SelectDDH");
// khởi tạo mảng đối tượng để hứng giá trị
Entities.DonDatHang[] kh1 = new Entities.DonDatHang[1];
clientstrem = cl.SerializeObj(this.client1, "DonDatHang", kh);
// đổ mảng đối tượng vào datagripview
kh1 = (Entities.DonDatHang[])cl.DeserializeHepper1(clientstrem, kh1);
if (kh1 == null)
{
hienthi = new Entities.DonDatHang[0];
dtgvKH.DataSource = hienthi;
return;
}
Entities.DonDatHang[] kh2 = new Entities.DonDatHang[kh1.Length];
int sotang = 0;
for (int j = 0; j < kh1.Length; j++)
{
if (kh1[j].Makhachhang == str1)
{
kh2[sotang] = kh1[j];
sotang++;
}
}
hienthi = new Entities.DonDatHang[sotang];
if (sotang != 0)
{
for (int j = 0; j < sotang; j++)
{
hienthi[j] = kh2[j];
}
}
else
{
hienthi = new Entities.DonDatHang[0];
dtgvKH.DataSource = new Entities.DonDatHang[0];
return;
}
dtgvKH.DataSource = hienthi;
dtgvKH.Rows[0].Selected = true;
}
catch (Exception ex)
{
}
finally
{
fix();
}
}
示例8: CheckDataGridCongSL
public void CheckDataGridCongSL(DataGridView dgv, string maKho)
{
if (dgv.RowCount != 0)
{
try
{
Server_Client.Client cl = new Server_Client.Client();
this.client1 = cl.Connect(Luu.IP, Luu.Ports);
Entities.ChiTietKhoHangTheoHoaHonNhap nv = new Entities.ChiTietKhoHangTheoHoaHonNhap("Select");
clientstrem = cl.SerializeObj(this.client1, "ChiTietKho", nv);
Entities.ChiTietKhoHangTheoHoaHonNhap[] kh1 = new Entities.ChiTietKhoHangTheoHoaHonNhap[1];
kh1 = (Entities.ChiTietKhoHangTheoHoaHonNhap[])cl.DeserializeHepper1(clientstrem, kh1);
List<Entities.ChiTietKhoHangTheoHoaHonNhap> ctList = new List<Entities.ChiTietKhoHangTheoHoaHonNhap>();
for (int i = 0; i < dgv.RowCount; i++)
{
bool retVal = false;
foreach (Entities.ChiTietKhoHangTheoHoaHonNhap item in kh1)
{
if (dgv["MaHangHoa", i].Value.ToString().ToUpper().Equals(item.Mahanghoa.ToUpper()) && maKho.Equals(item.Makho))
{
retVal = true;
break;
}
}
if (!retVal)
{
Entities.ChiTietKhoHangTheoHoaHonNhap ct = new Entities.ChiTietKhoHangTheoHoaHonNhap();
ct.Hanhdong = "Insert";
ct.Mahanghoa = dgv["MaHangHoa", i].Value.ToString();
ct.Makho = maKho;
ct.Ngaynhap = DateServer.Date();
DateTime ngayHetHan = DateTime.Now;
if (dgv["NgayHetHan", i] != null)
ngayHetHan = (DateTime)dgv["NgayHetHan", i].Value;
ct.Ngayhethan = ngayHetHan;
ct.Soluong = int.Parse(dgv["SoLuong", i].Value.ToString());
ct.Ghichu = "";
ctList.Add(ct);
}
}
Server_Client.Client cl1 = new Server_Client.Client();
this.client1 = cl1.Connect(Luu.IP, Luu.Ports);
clientstrem = cl1.SerializeObj(this.client1, "ThemChiTietKhoHang", ctList.ToArray());
}
catch (Exception)
{
}
}
}
示例9: SelectGoiHang
public void SelectGoiHang()
{
try
{
cl = new Server_Client.Client();
this.client = cl.Connect(Luu.IP, Luu.Ports);
Entities.GoiHang goi = new Entities.GoiHang("Select");
clientstrem = cl.SerializeObj(this.client, "GoiHang", goi);
Entities.GoiHang[] GoiHang = new Entities.GoiHang[1];
GoiHang = (Entities.GoiHang[])cl.DeserializeHepper1(clientstrem, GoiHang);
try
{
for (int j = 0; j < GoiHang.Length; j++)
{
if (GoiHang[j].Deleted == false)
{
Entities.ThongTinMaVach row = new Entities.ThongTinMaVach();
row.MaHangHoa = GoiHang[j].MaGoiHang;
row.TenHangHoa = GoiHang[j].TenGoiHang;
list.Add(row);
}
}
}
catch { }
try
{
for (int i = 0; i < this.search.Length; i++)
{
list.Add(this.search[i]);
}
}
catch { }
int k = list.Count;
if (k <= 0)
{
this.search = null;
}
else
{
this.search = new Entities.ThongTinMaVach[k];
for (int i = 0; i < k; i++)
{
this.search[i] = (Entities.ThongTinMaVach)list[i];
}
}
}
catch { }
}
示例10: LayDT
public Entities.LogFile[] LayDT()
{
try
{
Server_Client.Client cl = new Server_Client.Client();
this.client1 = cl.Connect(Luu.IP, Luu.Ports);
clientstrem = cl.SerializeObj(this.client1, "DocFileLog", null);
Entities.LogFile[] lf1 = (Entities.LogFile[])cl.DeserializeHepper1(clientstrem, null);
return lf1;
}
catch (Exception)
{
return null;
}
}
示例11: frmXuLyBanLe
/// <summary>
/// xử lý giá trị truyền tới
/// </summary>
/// <param name="str"></param>
public frmXuLyBanLe(string str)
{
try
{
InitializeComponent();
//
cl = new Server_Client.Client();
// gán TCPclient
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
CapNhatGia pt = new CapNhatGia("Select");
// khởi tạo mảng đối tượng để hứng giá trị
_cngkh = new CapNhatGia[1];
Clientstrem = cl.SerializeObj(Client1, "CapNhatGia", pt);
// đổ mảng đối tượng vào datagripview
_cngkh = (CapNhatGia[])cl.DeserializeHepper1(Clientstrem, _cngkh) ?? new CapNhatGia[0];
//
_datesv = DateServer.Date();
toolStripStatusLabel3.Enabled = false;
dtgvsanpham.DataSource = new HangHoaHienThi[0];
_str = str;
TheVip();
try
{
LayKhoHang();
new Common.Utilities().ComboxKhoHang(cbbkhohang);
}
catch
{
}
_datesv = DateServer.Date();
cbxHinhthucthanhtoan.SelectedIndex = 0;
mskngaychungtu.Text = new Common.Utilities().XuLy(2, _datesv.ToShortDateString());
lbnhanvien.Text = Common.Utilities.User.TenNhanVien;
//
KhoiTao();
_kmSoLuong = GetData();
}
catch
{
}
}
示例12: ChiTietHDBanHang
public void ChiTietHDBanHang()
{
try
{
cl = new Server_Client.Client();
this.client1 = cl.Connect(Luu.IP, Luu.Ports);
Entities.CheckRefer ctxh = new Entities.CheckRefer("CTHDBH");
clientstrem = cl.SerializeObj(this.client1, "Select", ctxh);
chitiethdbanhang = (Entities.ChiTietHDBanHang[])cl.DeserializeHepper1(clientstrem, chitiethdbanhang);
if (chitiethdbanhang == null)
{
chitiethdbanhang = new Entities.ChiTietHDBanHang[0];
return;
}
}
catch
{
}
}
示例13: LayChiTietQuyen
public Entities.ChiTietQuyen[] LayChiTietQuyen(string manhomquyen)
{
try
{
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 nếu muốn truyền giá trị
Entities.ChiTietQuyen nq = new Entities.ChiTietQuyen(manhomquyen);
// khởi tạo mảng đối tượng để hứng giá trị
Entities.ChiTietQuyen[] nq1;
clientstrem = cl.SerializeObj(this.client1, "LayChiTietQuyen", nq);
// đổ mảng đối tượng vào datagripview
nq1 = (Entities.ChiTietQuyen[])cl.DeserializeHepper1(clientstrem, null);
return nq1;
}
catch (Exception)
{
return null;
}
}
示例14: hienthi
public void hienthi()
{
Server_Client.Client cl = new Server_Client.Client();
this.client1 = cl.Connect(Luu.IP, Luu.Ports);
ntkkt = new NhomTKKeToan("Select", 1, "a", "a", "a", false);
clientstream = cl.SerializeObj(this.client1, "NhomTKKeToan", ntkkt);
NhomTKKeToan[] tk1 = new NhomTKKeToan[1];
tk1[0] = new NhomTKKeToan(1, "a", "a", "a", false);
tk1 = (NhomTKKeToan[])cl.DeserializeHepper1(clientstream, tk1);
foreach (NhomTKKeToan objtk in tk1)
{
if (objtk.MaNhomTKKeToan == maNhomTKKeToan)
{
txtID.Text = objtk.NhomTKKeToanID.ToString();
txtmaNTKKT.Text = objtk.MaNhomTKKeToan;
txttenNTKKT.Text = objtk.TenNhomTKKeToan;
txtghichu.Text = objtk.GhiChu;
}
}
}
示例15: cmbMaNhanVien_SelectedIndexChanged
private void cmbMaNhanVien_SelectedIndexChanged(object sender, EventArgs e)
{
cmbMaNhanVien.Items.Clear();
client = new Server_Client.Client();
this.tcpClient = client.Connect(Luu.IP, Luu.Ports);
Entities.NhanVien kh = new Entities.NhanVien();
kh = new Entities.NhanVien("Select");
networkStream = client.SerializeObj(this.tcpClient, "NhanVien", kh);
Entities.NhanVien[] kh1 = new Entities.NhanVien[1];
kh1 = (Entities.NhanVien[])client.DeserializeHepper1(networkStream, kh1);
if (kh1.Length > 0)
{
int sl = kh1.Length;
for (int i = 0; i < sl; i++)
{
if (kh1[i].Deleted == false)
cmbMaNhanVien.Items.Add(kh1[i].MaNhanVien);
}
}
}