本文整理汇总了C#中ServiceReference1.Service1Client.GetGopY方法的典型用法代码示例。如果您正苦于以下问题:C# ServiceReference1.Service1Client.GetGopY方法的具体用法?C# ServiceReference1.Service1Client.GetGopY怎么用?C# ServiceReference1.Service1Client.GetGopY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ServiceReference1.Service1Client
的用法示例。
在下文中一共展示了ServiceReference1.Service1Client.GetGopY方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bt_gopy_Click
private void bt_gopy_Click(object sender, EventArgs e)
{
try
{
if (tb_gopy.Text != "")
{
ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
client.GopYCompleted += new EventHandler<ServiceReference1.GopYCompletedEventArgs>(GopYCallBack);
client.GopYAsync(nh.Id, Form1.username, tb_gopy.Text, String.Format("{0:dd/MM/yyyy}", DateTime.Now));
tb_gopy.Text = "";
GopY[] comment = client.GetGopY(nh.Id);
lv_gopy.Items.Clear();
foreach (GopY cm in comment)
{
lv_gopy.Items.Add(cm.TenTaiKhoan + ": - " + cm.NgayGopY + " - " + cm.NoiDung);
}
}
}
catch
{
MessageBox.Show("Lỗi Dịch Vụ !", "Warning: ", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例2: lv_dsketqua_ItemSelectionChanged
private void lv_dsketqua_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
{
client = new ServiceReference1.Service1Client();
try
{
nh = client.GetNHCF(int.Parse(lv_dsketqua.Items[e.ItemIndex].ToolTipText), dsnhahang);
ThucDon[] menu = client.GetMenu(nh.Id);
GopY[] comment = client.GetGopY(nh.Id);
ds_sochodc.Items.Clear();
ds_sochodc.Items.Add("-Chọn số chỗ-");
for (int i = 1; i <= nh.SoCho; i *= 2)
{
ds_sochodc.Items.Add(i);
}
lv_menu.Items.Clear();
lv_gopy.Items.Clear();
foreach (ThucDon td in menu)
{
lv_menu.Items.Add("Tên Món Ăn: " + td.MonAn + " - Nguyên Liệu: " + td.NguyenLieu + " - Phương Pháp: " + td.PhuongPhap + " - Giá: " + td.Gia);
}
foreach (GopY cm in comment)
{
lv_gopy.Items.Add(cm.TenTaiKhoan + ": - " + cm.NgayGopY + " - " + cm.NoiDung);
}
KhuyenMai km = client.GetKhuyenMai(nh.Id);
tb_tenkhuyenmai.Text = km.TenKhuyenMai;
tb_thoigianstart.Text = km.ThoiGianStart;
tb_thoigianend.Text = km.ThoiGianEnd;
tb_thongtin.Text = km.ThongTin;
tb_ten.Text = nh.TenNhaHang;
tb_loaihinh.Text = nh.LoaiHinh;
tb_diachi.Text = nh.SoNha + " " + nh.Duong + ", Phường " + nh.Phuong + ", Quận " + nh.Quan + ", Tp. " + nh.ThanhPho;
tb_dienthoai.Text = nh.DienThoai;
tb_fax.Text = nh.Fax;
tb_website.Text = nh.WebSite;
tb_email.Text = nh.Email;
tb_datchotruoc.Text = nh.DatChoTruoc;
tb_socho.Text = nh.SoCho.ToString();
tb_giophucvu.Text = nh.GioPhucVu;
tb_mucdich.Text = nh.MucDich;
tb_khonggian.Text = nh.KhongGian;
tb_baidoxe.Text = nh.BaiDoXe;
tb_thanhtoan.Text = nh.ThanhToan;
tb_ngonngu.Text = nh.NgonNgu;
toolTip1.Show(nh.TenNhaHang + " " + nh.SoNha + " " + nh.Duong + ", Phường " + nh.Phuong + ", Quận " + nh.Quan + ", Tp." + nh.ThanhPho + "\nSố điện thoại : " + nh.DienThoai, lv_dsketqua, 2000);
}
catch (System.Exception ex)
{
MessageBox.Show("Truy cập thông tin bị lỗi !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}