Exemplo n.º 1
0
 public static String themThoiGianKhoiHanh(string id, string date)
 {
     Debug.WriteLine("id ajax : " + id + " date " + date);
     if (id != null && date != null)
     {
         ///DateTime x = DateTime.Parse(date.ToString());
         TourController tourController1 = new TourController();
         if (tourController1.kiemTraNgayKhoiHanh(id, date))
         {
             if (tourController1.themThoiGianKhoiHanh(Convert.ToInt32(id), date))
             {
                 DataTable table = tourController1.dsThoiGianKhoiHanh(Convert.ToInt32(id));
                 // Debug.WriteLine(JsonConvert.SerializeObject(table));
                 return(JsonConvert.SerializeObject(table));
             }
             else
             {
                 return(null);
             }
         }
         else
         {
             return(null);
         }
     }
     else
     {
         return(null);
     }
 }
Exemplo n.º 2
0
        public void danhSachThoiGianKhoiHanh(int id)
        {
            //Repeater rptTG1 = (Repeater)Master.FindControl("MainContent").FindControl("rptTG1");
            //Repeater rptTGs1 = Page.FindControl("rptTG1") as Repeater;
            Debug.WriteLine("id " + id);
            DataTable table = tourController.dsThoiGianKhoiHanh(id);

            rpt1.DataSource = table;
            rpt1.DataBind();
            //  Debug.WriteLine(JsonConvert.SerializeObject(table));
        }
Exemplo n.º 3
0
        public static String cntttg(string id, string idtour)
        {
            Debug.WriteLine("id ajax : " + id);
            TourController tourController1 = new TourController();

            try
            {
                if (tourController1.upDateTrangThaiThoiGian(Convert.ToInt32(id)))
                {
                    DataTable table = tourController1.dsThoiGianKhoiHanh(Convert.ToInt32(idtour));
                    //  Debug.WriteLine(JsonConvert.SerializeObject(table));
                    return(JsonConvert.SerializeObject(table));
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                return(null);
            }
        }