当前位置: 首页>>代码示例>>C#>>正文


C# ServiceReference1.Service1Client.GetAll_Passengers方法代码示例

本文整理汇总了C#中ServiceReference1.Service1Client.GetAll_Passengers方法的典型用法代码示例。如果您正苦于以下问题:C# ServiceReference1.Service1Client.GetAll_Passengers方法的具体用法?C# ServiceReference1.Service1Client.GetAll_Passengers怎么用?C# ServiceReference1.Service1Client.GetAll_Passengers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ServiceReference1.Service1Client的用法示例。


在下文中一共展示了ServiceReference1.Service1Client.GetAll_Passengers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnU_Click

 protected void btnU_Click(object sender, EventArgs e)
 {
     ServiceReference1.Passenger passenger = new ServiceReference1.Passenger();
     passenger.PNR = pnr;
     passenger.Passenger_Name = txtName.Text;
     passenger.Date_Of_Birth = DateTime.Parse(txtBirth.Text);
     passenger.Phone_Number = txtPhone.Text;
     passenger.Email = txtE.Text;
     ServiceReference1.Service1Client sr = new ServiceReference1.Service1Client();
     if (sr.Update_Passengers(passenger) == 1)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "Thông báo", "alert('Update successed !!!');", true);
         dgPass.DataSource = sr.GetAll_Passengers();
         dgPass.DataBind();
         Reset();
     }
     else
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "Thông báo", "alert('Update failed !!!');", true);
     }
     
 }
开发者ID:QuangNguyen263,项目名称:Online-Railway-Reservation-ASP.NET,代码行数:22,代码来源:Passenger_Manager.aspx.cs

示例2: btnD_Click

 protected void btnD_Click(object sender, EventArgs e)
 {
     ServiceReference1.Service1Client sr = new ServiceReference1.Service1Client();
     var a = sr.Search_Ticket_By_PNR(pnr);
     int d = 0;
     foreach (var item in sr.Search_Ticket_By_PNR(pnr))
     {
         if (item.Status == "active" && item.Departure_Date > DateTime.Now.Date) {
             d++;
         }
     }
     if (d>0)
     {
         ScriptManager.RegisterStartupScript(this, GetType(), "Thông báo", "alert('PNR tickets still exist. Can not Delete. Please, try again !!!');", true);
     }
     else
     {
         if (sr.Delete_Passengers(pnr) == 1)
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "Thông báo", "alert('Delete passenger successed !!!');", true);
             dgPass.DataSource = sr.GetAll_Passengers();
             dgPass.DataBind();
             Reset();
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, GetType(), "Thông báo", "alert('Delete passenger failed !!!');", true);
         }
     }
 }
开发者ID:QuangNguyen263,项目名称:Online-Railway-Reservation-ASP.NET,代码行数:30,代码来源:Passenger_Manager.aspx.cs


注:本文中的ServiceReference1.Service1Client.GetAll_Passengers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。