protected void Page_Load(object sender, EventArgs e)
          {
              if (!IsPostBack)
              {

                  DataSet ds = objTransferPackageTimings.GetAllTrasferpackageDescription(int.Parse(Request.QueryString["ID"].ToString()));
                  GridView1.DataSource = ds;
                  GridView1.DataBind();


                  foreach (GridViewRow item in GridView1.Rows)
                  {
                      Label lblfromTOid = (Label)item.FindControl("lbltp_detialid");
                      Label lblFlag = (Label)item.FindControl("lblFlag");
                      DDL1 = (MulticheckDropdown)item.FindControl("DDL1");
                      DataSet ds1 = objTransferPackageTimings.GetAallTimings();

                      //DataSet DsMealDate = objHotelStoreProcedure.getALLdateFORmEAL(txtpty_CheckIn.Text, txtpty_CheckOut.Text);
                      ListItemCollection list = new ListItemCollection();
                      for (int i1 = 0; i1 < ds1.Tables[0].Rows.Count; i1++)
                      {
                          ListItem listitem = new ListItem(Convert.ToString(ds1.Tables[0].Rows[i1]["TIME"]), Convert.ToString(ds1.Tables[0].Rows[i1]["TIME"]));
                          list.Add(listitem);

                      }
                      DDC1.DDList.DataSource = list;
                      DDC1.DDList.DataTextField = "Text";
                      DDC1.DDList.DataValueField = "Value";
                      DDC1.DDList.DataBind();


                      DataSet ds11 = objTransferPackageTimings.GetAllTrasferpackageTimmings(int.Parse(lblfromTOid.Text), lblFlag.Text, "SIC");

                      if (ds11.Tables[0].Rows.Count != 0)
                      {

                          ListItemCollection list2 = new ListItemCollection();
                          for (int j = 0; j < ds11.Tables[0].Rows.Count; j++)
                          {
                              for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
                              {
                                  if (ds1.Tables[0].Rows[i]["TIME"].ToString() == ds11.Tables[0].Rows[j]["AutoSearchResult"].ToString())
                                  {
                                      setchk = setchk + "," + Convert.ToString(ds11.Tables[0].Rows[j]["AutoSearchResult"].ToString());
                                  }

                              }

                          }

                          setchk = setchk.Substring(1);
                          DDC1.SetCheckBoxValues(setchk);
                          setchk = "";
                      }

                  }

              }

          }
          protected void btnSave_Click(object sender, EventArgs e)
          {
              foreach (GridViewRow item in GridView1.Rows)
              {
                  Label lblFromId = (Label)item.FindControl("lblFromId");
                  Label lblToId = (Label)item.FindControl("lblToId");
                  DDL1 = (MulticheckDropdown)item.FindControl("DDL1");

                  objTransferPackageTimings.DeleteTimings(int.Parse(lblFromId.Text), int.Parse(lblToId.Text));

                  string str1 = DDC1.GetCheckBoxValues(); ;
                  string[] words = str1.Split(',');

                  foreach (string word in words)
                  {
                      objTransferPackageTimings.InsetTimings(int.Parse(lblFromId.Text), int.Parse(lblToId.Text), word);
                  }
              }
              Master.DisplayMessage("Record Updated Successfully");
          }
Ejemplo n.º 3
0
        /*17th october Validation On reconfirm Button*/
        protected void reconfirmValidation()
        {
            DataSet ds = objfitquote.FetchForFitBooking("FETCH_DATA_FOR_BOOKING_FIT_USING_TOURID", Request.QueryString["TOURID"].ToString());
            DataTable dt1 = ds.Tables[0];

            if (Session["noofcwb"].ToString() != dt1.Rows[0]["NO_OF_CWB"].ToString())
            {
                Session["reconfirmErrormsg"] = "You have changed no of CWB.";
                reconfirmFlag = false;
            }

            if (Session["noofcnb"].ToString() != dt1.Rows[0]["NO_OF_CNB"].ToString())
            {
                Session["reconfirmErrormsg"] = "You have changed no of CNB.";
                reconfirmFlag = false;
            }

            if (Session["noofadult"].ToString() != dt1.Rows[0]["NO_OF_ADULTS"].ToString())
            {
                Session["reconfirmErrormsg"] = "You have changed no of Adults.";
                reconfirmFlag = false;
            }

            if (Session["nights"].ToString() != dt1.Rows[0]["NO_OF_NIGHTS"].ToString())
            {
                Session["reconfirmErrormsg"] = "You have changed no of Nights.";
                reconfirmFlag = false;
            }
            if (Session["noofinfant"].ToString() != dt1.Rows[0]["NO_OF_INFANT"].ToString())
            {
                Session["reconfirmErrormsg"] = "You have changed no of Infant.";
                reconfirmFlag = false;
            }

            if (Session["fromdate"].ToString() != dt1.Rows[0]["TOUR_FROM_DATE"].ToString())
            {
                Session["reconfirmErrormsg"] = "You have changed no of Tour From date.";
                reconfirmFlag = false;
            }

            if (Session["todate"].ToString() != dt1.Rows[0]["TOUR_TO_DATE"].ToString())
            {
                Session["reconfirmErrormsg"] = "You have changed no of Tour to date.";
                reconfirmFlag = false;
            }

            if (Session["fit_select_type"].ToString() != dt1.Rows[0]["PACKAGE_TYPE"].ToString())
            {
                Session["reconfirmErrormsg"] = "You have changed Package Type.";
                reconfirmFlag = false;
            }

            DataSet dsRoomsingle = objfitquote.FetchNoofRooms("FETCH_DATA_ROOMS_FOR_VALIDATION", Request.QueryString["QUOTEID"], "1");

            if (dsRoomsingle.Tables[0].Rows.Count != 0)
            {
                if (Session["singleroom"].ToString() != dsRoomsingle.Tables[0].Rows[0]["NO_OF_ROOMS"].ToString())
                {
                    Session["reconfirmErrormsg"] = "You have changed in No of Single Rooms.";
                    reconfirmFlag = false;
                }
            }
            else if (dsRoomsingle.Tables[0].Rows.Count == 0 && Session["singleroom"].ToString() != "")
            {
                Session["reconfirmErrormsg"] = "You have changed in No of Single Rooms.";
                reconfirmFlag = false;
            }


            DataSet dsRoomsingle2 = objfitquote.FetchNoofRooms("FETCH_DATA_ROOMS_FOR_VALIDATION", Request.QueryString["QUOTEID"], "2");

            if (dsRoomsingle2.Tables[0].Rows.Count != 0)
            {
                if (Session["doubleroom"].ToString() != dsRoomsingle2.Tables[0].Rows[0]["NO_OF_ROOMS"].ToString())
                {
                    Session["reconfirmErrormsg"] = "You have changed in No of Double Rooms.";
                    reconfirmFlag = false;
                }
            }
            else if (dsRoomsingle2.Tables[0].Rows.Count == 0 && Session["doubleroom"].ToString() != "")
            {
                Session["reconfirmErrormsg"] = "You have changed in No of Double Rooms.";
                reconfirmFlag = false;
            }

            DataSet dsRoomsingle3 = objfitquote.FetchNoofRooms("FETCH_DATA_ROOMS_FOR_VALIDATION", Request.QueryString["QUOTEID"], "3");

            if (dsRoomsingle3.Tables[0].Rows.Count != 0)
            {
                if (Session["tripleroom"].ToString() != dsRoomsingle3.Tables[0].Rows[0]["NO_OF_ROOMS"].ToString())
                {
                    Session["reconfirmErrormsg"] = "You have changed in No of Triple Rooms.";
                    reconfirmFlag = false;
                }
            }
            else if (dsRoomsingle3.Tables[0].Rows.Count == 0 && Session["tripleroom"].ToString() != "")
            {
                Session["reconfirmErrormsg"] = "You have changed in No of Triple Rooms.";
                reconfirmFlag = false;
            }



            DataSet dsHotel = objHotelStoreProcedure.FetchForFitHotelEdit("FETCH_HOTEL_DATA_FOR_VALIDATION", Request.QueryString["QUOTEID"].ToString());
            DataTable dtHotel = dsHotel.Tables[0];



            cityname = "";
            DataTable dt = objHotelStoreProcedure.fetchpacageid(package_id);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                cityname += "," + dt.Rows[i]["CITY_NAME"].ToString();
            }

            string str1 = cityname;
            string[] words = str1.Split(',');

            foreach (string word in words)
            {
                if (word == "Bangkok")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Bangkok")
                        {
                            if (ddrbkk_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Bangkok's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrbkk_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Bangkok's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtbkk_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Bangkok's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtbkk_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Bangkok's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }

                    // Site Seeing Validation

                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView1.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_bkk_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_Bkk_noofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {

                            foreach (GridViewRow item in GridView1.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_bkk_select");
                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_Bkk_packageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList1");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_Bkk_noofMeals");

                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_Bkkdate");

                                    DDL1 = (MulticheckDropdown)item.FindControl("DDL1");

                                    bool site_flag = false;

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                   
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                               
                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC1.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');
                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;


                                                        if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                        if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }
                                                        else
                                                        {
                                                            if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                            {
                                                               // reconfrimSiteFlag = true;
                                                                
                                                            }
                                                            else
                                                            {
                                                                Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                reconfrimSiteFlag = false;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                         
                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                                //reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }


                // Pattaya

                if (word == "Pattaya")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Pattaya")
                        {
                            if (ddrpty_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Pattya's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrpty_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Pattya's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtpty_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Pattaya's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtpty_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Pattaya's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }

                    // Site Seeing Validation

                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GV_Result.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_pty_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_PtynoofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GV_Result.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_pty_select");
                                DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList2");
                                TextBox txtDate = (TextBox)item.FindControl("txtSS_Ptydate");
                                TextBox txtMeals = (TextBox)item.FindControl("txtSS_PtynoofMeals");

                                DDL2 = (MulticheckDropdown)item.FindControl("DDL2");

                                bool site_flag = false;

                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_PtypackageDetails");

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC2.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;

                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 //reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                              //  reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }


                // Phuket    

                if (word == "Phuket")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Phuket")
                        {
                            if (ddrphu_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Phuket's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrphu_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Phuket's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtphu_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Phuket's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtphu_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Phuket's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }

                    // Site Seeing Validation

                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView2.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_phu_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_phuketnoofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GridView2.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_phu_select");
                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_phuketpackageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList3");
                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_phuketdate");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_phuketnoofMeals");

                                    DDL3 = (MulticheckDropdown)item.FindControl("DDL3");

                                    bool site_flag = false;

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC3.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;

                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 // reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                               // reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }
                }


                // Krabi

                if (word == "Krabi")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Krabi")
                        {
                            if (ddrkbv_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Krabi's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrkbv_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Krabi's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtkbv_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Krabi's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtkbv_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Krabi's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }

                    // Site Seeing Validation

                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView3.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_kbv_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_kbv_noofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GridView3.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_kbv_select");
                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_kbv_packageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList4");
                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_kbv_date");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_kbv_noofMeals");

                                    DDL4 = (MulticheckDropdown)item.FindControl("DDL4");


                                    bool site_flag = false;
                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                   
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC4.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;

                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 //  reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                             //   reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }


                // Samui

                if (word == "Samui")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Samui")
                        {
                            if (ddrusm_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Samui's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrusm_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Samui's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtusm_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Samui's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtusm_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Samui's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }

                    // Site Seeing Validation

                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView4.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_usm_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_usm_noofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GridView4.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_usm_select");
                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_usm_packageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList5");
                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_usm_date");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_usm_noofMeals");

                                    DDL5 = (MulticheckDropdown)item.FindControl("DDL5");

                                    bool site_flag = false;

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                   
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC5.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;


                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 // reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                             //   reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }


                // Chiangmai

                if (word == "Chiangmai")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Chiangmai")
                        {
                            if (ddrcnx_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Chiangmai's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrcnx_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Chiangmai's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtcnx_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Chiangmai's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtcnx_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Chingmai's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }

                    // Site Seeing Validation

                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView5.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_cnx_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_cnx_noofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GridView5.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_cnx_select");
                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_cnx_packageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList6");
                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_cnx_date");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_cnx_noofMeals");

                                    DDL6 = (MulticheckDropdown)item.FindControl("DDL6");

                                    bool site_flag = false;

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC6.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;

                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 // reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                               // reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }


                // Hua Hin    

                if (word == "Hua Hin")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Hua Hin")
                        {
                            if (ddretc_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Hua Hin's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddretc_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Hua Hin's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtetc_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Hua Hin's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtetc_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Hua Hin's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }

                    // Site Seeing Validation

                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView6.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_etc_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_etc_noofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GridView6.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_etc_select");

                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_etc_packageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList7");
                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_etc_date");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_etc_noofMeals");

                                    DDL7 = (MulticheckDropdown)item.FindControl("DDL7");

                                    bool site_flag = false;

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                   
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC7.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;

                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 // reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                              //  reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }


                // kanchanburi

                if (word == "Kanchanburi")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Kanchanburi")
                        {
                            if (ddrss_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Kanchanburi's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrss_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Kanchanburi's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtss_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in kanchanburi's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtss_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in kanchanburi's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }

                    // Site Seeing Validation
                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView7.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_s_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_s_noofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GridView7.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_s_select");
                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_s_packageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList8");
                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_s_date");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_s_noofMeals");

                                    DDL8 = (MulticheckDropdown)item.FindControl("DDL8");

                                    bool site_flag = false;

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                   
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC8.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;

                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 //  reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                               // reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }


                // Chingrai  

                if (word == "Chingrai")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Chingrai")
                        {
                            if (ddrsps_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Chingrai's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrsps_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Chingrai's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtsps_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Chingrai's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtsps_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Chingrai's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }


                    // Site Seeing Validation
                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView8.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_sps_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_sps_noofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GridView8.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_sps_select");
                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_sps_packageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList9");
                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_sps_date");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_sps_noofMeals");

                                    DDL9 = (MulticheckDropdown)item.FindControl("DDL9");

                                    bool site_flag = false;

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                   
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC9.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;

                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 //   reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                               // reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }

                // Phi Phi island

                if (word == "Phi Phi Island")
                {
                    for (int i = 0; i < dtHotel.Rows.Count; i++)
                    {
                        if (dtHotel.Rows[i]["CITY_NAME"].ToString() == "Phi Phi Island")
                        {
                            if (ddrzz_HotelName.Text != dtHotel.Rows[i]["CHAIN_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Phi Phi Island's Hotel.";
                                reconfirmFlag = false;
                            }
                            if (ddrzz_RoomType.Text != dtHotel.Rows[i]["ROOM_TYPE_NAME"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Phi Phi Island's Hotel Room type.";
                                reconfirmFlag = false;
                            }
                            if (txtzz_CheckIn.Text != dtHotel.Rows[i]["FROM_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Phi Phi Island's Hotel Check in date.";
                                reconfirmFlag = false;
                            }
                            if (txtzz_CheckOut.Text != dtHotel.Rows[i]["TO_DATE"].ToString())
                            {
                                Session["reconfirmErrormsg"] = "You have changed in Phi Phi Island's Hotel Check out date.";
                                reconfirmFlag = false;
                            }

                        }
                    }


                    // Site Seeing Validation
                    DataTable dtSite = objfitquote.fetchsiteseeingForValidation("FETCH_ALL_DATA_FOR_SITESEEING_VALIDATION", Request.QueryString["QUOTEID"].ToString(), word);

                    int countSite = 0;

                    foreach (GridViewRow item in GridView9.Rows)
                    {
                        CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_zz_select");
                        TextBox txtMeals = (TextBox)item.FindControl("txtSS_zz_noofMeals");
                        if (cb_bkk_select.Checked == true)
                        {
                            for (int i = 0; i < int.Parse(txtMeals.Text); i++)
                            {
                                countSite++;
                            }
                        }
                    }

                    if (dtSite.Rows.Count != countSite)
                    {
                        reconfrimSiteFlag = false;
                    }
                    else
                    {
                        if (reconfrimSiteFlag == true)
                        {
                            foreach (GridViewRow item in GridView9.Rows)
                            {
                                CheckBox cb_bkk_select = (CheckBox)item.FindControl("cb_zz_select");
                                if (cb_bkk_select.Checked == true)
                                {
                                    Label lbl = (Label)item.FindControl("lblSS_zz_packageDetails");
                                    DropDownList drpFlag = (DropDownList)item.FindControl("DropDownList10");
                                    TextBox txtDate = (TextBox)item.FindControl("txtSS_zz_date");
                                    TextBox txtMeals = (TextBox)item.FindControl("txtSS_zz_noofMeals");

                                    DDL10 = (MulticheckDropdown)item.FindControl("DDL10");

                                    bool site_flag = false;

                                    for (int i = 0; i < dtSite.Rows.Count; i++)
                                    {
                                        if (lbl.Text == dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString())
                                        {
                                            site_flag = true;

                                            if (drpFlag.Text == dtSite.Rows[i]["SIC_PVT_FLAG"].ToString())
                                            {
                                                reconfrimSiteFlag = true;

                                            }
                                            else
                                            {
                                                Session["reconfirmErrormsg"] = "You have changed in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                reconfrimSiteFlag = false;
                                            }
                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtMeals.Text == dtSite.Rows[i]["NO_OF_MEALS"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                   
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed meals in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }
                                            }

                                            if (reconfrimSiteFlag == true)
                                            {
                                                if (txtDate.Text == dtSite.Rows[i]["DATE"].ToString())
                                                {
                                                    reconfrimSiteFlag = true;
                                                    if (int.Parse(txtMeals.Text) > 1)
                                                    {

                                                    }
                                                    else
                                                    {
                                                        break;
                                                    }
                                                }
                                                else
                                                {
                                                    Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                    reconfrimSiteFlag = false;
                                                }

                                                if (int.Parse(txtMeals.Text) > 1)
                                                {
                                                    string str11 = DDC10.GetCheckBoxValues(); ;
                                                    string[] words11 = str11.Split(',');

                                                    for (int k = 0; k < int.Parse(txtMeals.Text) - 1; k++)
                                                    {
                                                        i = i + 1;

                                                         if (words11[0].ToString() == "")
                                                        {
                                                            Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                            reconfrimSiteFlag = false;
                                                        }

                                                         if (words11.Length != int.Parse(txtMeals.Text) - 1)
                                                         {
                                                             Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                             reconfrimSiteFlag = false;
                                                         }
                                                         else
                                                         {
                                                             if (words11[k].ToString() == dtSite.Rows[i]["DATE"].ToString())
                                                             {
                                                                 // reconfrimSiteFlag = true;

                                                             }
                                                             else
                                                             {
                                                                 Session["reconfirmErrormsg"] = "You have changed Date in" + "  " + dtSite.Rows[i]["SIGHT_SEEING_PACKAGE_NAME"].ToString() + " " + "Sightseeing";
                                                                 reconfrimSiteFlag = false;
                                                             }
                                                         }
                                                    }
                                                }
                                            }

                                        }
                                        else
                                        {
                                            if (site_flag != true)
                                            {
                                                reconfrimSiteFlag = false;
                                            }
                                            else
                                            {
                                               // reconfrimSiteFlag = true;
                                            }
                                        }

                                    }
                                    if (reconfrimSiteFlag == false)
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }

                }

            }
            transfervalidation();
            DataTable dttra = objHotelStoreProcedure.fetchTransferPackageforedit("FETCH_ALL_DATA_FOR_VALIDATION_FIT", Request.QueryString["QUOTEID"].ToString());
            if (dttra.Rows.Count == 0 && Session["valid"] != null)
            {
                Session["reconfirmErrormsg"] = "You have changed in Transfer package.";
                reconfirmFlag = false;
            }
            else if (dttra.Rows.Count != 0 && Session["valid"] != null)
            {
                if (dttra.Rows[0]["TRANSFER_PACKAGE_PRICE_ID"].ToString() != Session["valid"].ToString())
                {
                    Session["reconfirmErrormsg"] = "You have changed in Transfer package.";
                    reconfirmFlag = false;
                }
            }
            else if (dttra.Rows.Count != 0 && Session["valid"] == null)
            {
                Session["reconfirmErrormsg"] = "You have changed in Transfer package.";
                reconfirmFlag = false;
            }


            string arrivalTime = "";
            string departureTime = "";

            string arrivalDate = "";
            string departureDate = "";

            string arrivalFlag = "";
            string departureflag = "";
            foreach (GridViewRow item in GridView10.Rows)
            {


                RadioButton rbtn = (RadioButton)item.FindControl("rbtnTPselect");
                Label flag = (Label)item.FindControl("lbltp_flag");
                TextBox txtdate = (TextBox)item.FindControl("txtTPdate");
                Label tp_fromto_id = (Label)item.FindControl("lbltp_detialid");
                Label id = (Label)item.FindControl("lbltp_priceid");

                DropDownList drptransferSicPvt = (DropDownList)item.FindControl("drptransfer");

                if (rbtn.Checked)
                {
                    tpid = id.Text;
                    if (flag.Text == "A")
                    {
                        DropDownList drp_list = (DropDownList)item.FindControl("tpdrp_time");

                        arrivalDate = txtdate.Text;
                        arrivalFlag = drptransferSicPvt.Text;
                        arrivalTime = drp_list.Text;
                    }

                }
                else if (tpid == id.Text)
                {
                    if (flag.Text == "D")
                    {
                        DropDownList drp_list = (DropDownList)item.FindControl("tpdrp_time");
                        departureDate = txtdate.Text;
                        departureflag = drptransferSicPvt.Text;
                        departureTime = drp_list.Text;
                    }

                }
            }

                for (int i = 0; i < dttra.Rows.Count; i++)
                {
                    if (dttra.Rows[i]["FLAG"].ToString() == "A")
                    {
                        if (dttra.Rows[i]["SIC_PVT_FLAG"].ToString() != arrivalFlag)
                        {
                            Session["reconfirmErrormsg"] = "You have changed in Transfer package SIC/PVT flag.";
                            reconfirmFlag = false;
                            break;
                        }
                    }
                    else if (dttra.Rows[i]["FLAG"].ToString() == "D")
                    {
                        if (dttra.Rows[i]["SIC_PVT_FLAG"].ToString() != departureflag)
                        {
                            Session["reconfirmErrormsg"] = "You have changed in Transfer package SIC/PVT flag.";
                            reconfirmFlag = false;
                            break;
                        }
                    }
                }
            }