本文整理汇总了C#中Server_Client.Client类的典型用法代码示例。如果您正苦于以下问题:C# Server_Client.Client类的具体用法?C# Server_Client.Client怎么用?C# Server_Client.Client使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Server_Client.Client类属于命名空间,在下文中一共展示了Server_Client.Client类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: HienThi
public void HienThi()
{
try
{
bool kt = false;
cl = new Server_Client.Client();
this.client = cl.Connect(Luu.IP, Luu.Ports);
clientstrem = cl.SerializeObj(this.client, "SoDuKho", new Entities.SoDuKho("Select"));
ddh = new Entities.SoDuKho[1];
ddh = (Entities.SoDuKho[])cl.DeserializeHepper(clientstrem, ddh);
if (ddh == null)
{
toolStrip1.Enabled = true;
dgvsodukhohang.DataSource = new Entities.SoDuKho[0];
FixDatagridview();
return;
}
Entities.KhoHang kh = (Entities.KhoHang)cbbkhohang.SelectedItem;
List<Entities.SoDuKho> L = new List<Entities.SoDuKho>();
DateTime SoSanh = new DateTime(int.Parse(cbbnam.Text), int.Parse(cbbthang.Text), 1);
foreach (Entities.SoDuKho item in ddh)
{
if ((item.TrangThai && !kt) || (!kt && (item.NgayKetChuyen.Month == SoSanh.Month - 1) && (item.NgayKetChuyen.Year == SoSanh.Year) && (item.MaKho.ToUpper().Equals(kh.MaKho.ToUpper()))))
{
kt = item.TrangThai;
}
if ((item.NgayKetChuyen.Month == SoSanh.Month) && (item.NgayKetChuyen.Year == SoSanh.Year) && (item.MaKho.ToUpper().Equals(kh.MaKho.ToUpper())))
{
L.Add(item);
}
}
if (L.Count == 0)
{
lbltrangthai.Text = "";
toolStrip1.Enabled = true;
dgvsodukhohang.DataSource = new Entities.SoDuKho[0];
FixDatagridview();
return;
}
if (L[0].TrangThai)
{
lbltrangthai.ForeColor = Color.Red;
lbltrangthai.Text = "Kỳ Đã Khóa";
toolStrip1.Enabled = false;
}
else
{
lbltrangthai.ForeColor = Color.Green;
lbltrangthai.Text = "Kỳ Chưa Khóa";
toolStrip1.Enabled = true;
}
dgvsodukhohang.DataSource = L.ToArray();
FixDatagridview();
if (kt)
{
toolStrip1.Enabled = false;
}
}
catch { }
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:60,代码来源:frmSoDuKhoHang.cs
示例2: 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";
}
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:26,代码来源:frmThemloaihanghoa.cs
示例3: LogIn
/// <summary>
/// hàm đăng nhập
/// </summary>
/// <param name="ttk"></param>
/// <param name="mk"></param>
/// <returns></returns>
public bool LogIn(string ttk,string mk)
{
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.TaiKhoan tk = new Entities.TaiKhoan();
tk = new Entities.TaiKhoan(ttk, mk);
// khởi tạo mảng đối tượng để hứng giá trị
tk1 = new Entities.TaiKhoan[1];
clientstrem = cl.SerializeObj(this.client1, "LogIn", tk);
// đổ mảng đối tượng vào datagripview
tk1 = (Entities.TaiKhoan[])cl.DeserializeHepper1(clientstrem, tk1);
if (tk1.Length > 0)
{
if (!tk1[0].KhoaTaiKhoan)
{
Common.Utilities.User = User = tk1[0];
Common.Utilities.CTQ = CTQ = LayChiTietQuyen(User.TenNhomQuyen);
return true;
}
return false;
}
else
return false;
}
catch (Exception w)
{
string str=w.Message;
return false;
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:41,代码来源:frmDangNhap.cs
示例4: ProID
public string ProID(string tenBang)
{
try
{
string idnew;
Server_Client.Client cl = new Server_Client.Client();
// gán TCPclient
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
Entities.LayID lid1 = new Entities.LayID("Select", tenBang);
// khởi tạo mảng đối tượng để hứng giá trị
Entities.LayID lid = new Entities.LayID();
NetworkStream clientstrem = cl.SerializeObj(client1, "LayID", lid1);
// đổ mảng đối tượng vào datagripview
lid = (Entities.LayID)cl.DeserializeHepper(clientstrem, lid);
if (lid == null)
{
if (tenBang.Equals("TyLeTinh"))
{
return "TLT_0001";
}
else if (tenBang.Equals("DiemThuongKhachHang"))
{
return "DTKH_0001";
}
}
Common.Utilities a = new Common.Utilities();
idnew = a.ProcessID(lid.ID);
return idnew;
}
catch
{ return ""; }
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:33,代码来源:frmTinhDiemThuong.cs
示例5: 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;
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:27,代码来源:frmBaoCaoNhapHangThepNhomHang.cs
示例6: 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();
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:33,代码来源:frmQuanLySaoLuuHeThong.cs
示例7: ProID
public string ProID(string tenBang)
{
try
{
string idnew;
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.LayID lid1 = new Entities.LayID("Select", tenBang);
// khởi tạo mảng đối tượng để hứng giá trị
Entities.LayID lid = new Entities.LayID();
clientstrem = cl.SerializeObj(this.client1, "LayID", lid1);
// đổ mảng đối tượng vào datagripview
lid = (Entities.LayID)cl.DeserializeHepper(clientstrem, hienthi);
if (lid == null)
return "SDCN_0001";
Common.Utilities a = new Common.Utilities();
idnew = a.ProcessID(lid.ID);
return idnew;
}
catch (Exception ex)
{
return "";
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:26,代码来源:frmKetChuyenSoDuCongNo.cs
示例8: 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";
}
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:26,代码来源:frmSuaKhoHang.cs
示例9: 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();
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:62,代码来源:frmTimNhanVien.cs
示例10: 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.HDBanHang kh = new Entities.HDBanHang("Select");
// khởi tạo mảng đối tượng để hứng giá trị
Entities.HDBanHang[] kh1 = new Entities.HDBanHang[1];
clientstrem = cl.SerializeObj(this.client1, "HDBanHang", kh);
// đổ mảng đối tượng vào datagripview
kh1 = (Entities.HDBanHang[])cl.DeserializeHepper1(clientstrem, kh1);
if (kh1 == null)
{
hienthi = new Entities.HDBanHang[0];
dtgvKH.DataSource = new Entities.HDBanHang[0];
return;
}
Entities.HDBanHang[] kh2 = new Entities.HDBanHang[kh1.Length];
int sotang = 0;
for (int j = 0; j < kh1.Length; j++)
{
if (kh1[j].MaKhachHang == str1 && kh1[j].Deleted == false && kh1[j].LoaiHoaDon == false && !kh1[j].TongTienThanhToan.Equals(kh1[j].ThanhToanNgay) && !kh1[j].TongTienThanhToan.Equals(kh1[j].ThanhToanKhiLapPhieu))
{
kh2[sotang] = kh1[j];
sotang++;
}
}
hienthi = new Entities.HDBanHang[sotang];
if (sotang != 0)
{
for (int j = 0; j < sotang; j++)
{
hienthi[j] = kh2[j];
}
}
else
{
hienthi = new Entities.HDBanHang[0];
dtgvKH.DataSource = new Entities.HDBanHang[0];
return;
}
dtgvKH.DataSource = hienthi;
dtgvKH.Rows[0].Selected = true;
}
catch (Exception ex)
{
MessageBox.Show("Không kết nối được với server - thử lại sau");
}
finally
{
fix();
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:62,代码来源:frmTimHDBanHang.cs
示例11: 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();
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:58,代码来源:frmTimNhomHang.cs
示例12: 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();
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:60,代码来源:frmTimDonDatHang.cs
示例13: BaoCaoKhoHang
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private Entities.BaoCaoXuatHangTheoKho[] BaoCaoKhoHang(string makho, string ngay)
{
Entities.BaoCaoXuatHangTheoKho[] tralai = null;
Entities.TruyenGiaTri truyen = new Entities.TruyenGiaTri("Select", makho, ngay);
cl = new Server_Client.Client();
this.client = cl.Connect(Luu.IP, Luu.Ports);
clientstrem = cl.SerializeObj(this.client, "BaoCaoXuatHangTheoKho", truyen);
tralai = (Entities.BaoCaoXuatHangTheoKho[])cl.DeserializeHepper(clientstrem, tralai);
return tralai;
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:15,代码来源:frmBaoCaoXuatHang.cs
示例14: Date
public static DateTime Date()
{
Server_Client.Client cl = new Server_Client.Client();
client1 = cl.Connect(Luu.IP, Luu.Ports);
Entities.CheckRefer pt = new Entities.CheckRefer();
clientstrem = cl.SerializeObj(client1, "Datetime", pt);
DateTime dt = new DateTime();
dt = (DateTime)cl.DeserializeHepper(clientstrem, dt);
return dt;
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:10,代码来源:Check.cs
示例15: 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)
{
}
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:51,代码来源:frmHienThi_XacNhanDieuChuyenKho.cs
示例16: 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 { }
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:49,代码来源:frmTimKiemHangHoaGoiHang.cs
示例17: Restore
public bool Restore(Entities.SaoLuuHeThong slht1)
{
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, "Restore", slht1);
//lấy giá trị về
bool tv = (bool)cl.DeserializeHepper(clientstrem, null);
return tv;
}
catch { return false; }
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:15,代码来源:frmQuanLySaoLuuHeThong.cs
示例18: 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;
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:16,代码来源:frmQuanLyLogFile.cs
示例19: CheckReference
public bool CheckReference(string tenTruong, string maTruong)
{
try
{
Server_Client.Client cl = new Server_Client.Client();
this.client1 = cl.Connect(Luu.IP, Luu.Ports);
Entities.CheckRefer pt = new Entities.CheckRefer(tenTruong, maTruong);
bool kt = false;
clientstrem = cl.SerializeObj(this.client1, "CheckRefer", pt);
kt = (bool)cl.DeserializeHepper(clientstrem, kt);
return kt;
}
catch
{
return false;
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:17,代码来源:Check.cs
示例20: 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
{
}
}
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:47,代码来源:frmXuLyBanLe.cs
注:本文中的Server_Client.Client类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论