public void InsertNewHotel(string Tour_Id)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.InsertNewHotel(Tour_Id);
 }
 public void AssignStartEndCity(int TourId, string AssignStartEndCity)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.AssignStartEndCity(TourId, AssignStartEndCity);
 }
 public void InsertUpdateDeck(ArrayList ary)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.InsertUpdateDeckDetail(ary);
 }
 public void AssignCountry(int TourId, string Country)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.AssignCountry(TourId, Country);
 }
 public void AssignCITY(int TourId, string AssignCITY)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.AssignCITY(TourId, AssignCITY);
 }
 public void AssignStartEndCity(int TourId, ArrayList STARTENDCITY)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.AssignCountry(TourId, STARTENDCITY.ToString());
 }
        public void CopyData(int TourId)
        {

            TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();

            //System.IO.File.Copy
            System.Data.DataSet ds = objempentity.CopyData(TourId);
            string N_TOUR_ID = ds.Tables[0].Rows[0]["TOUR_ID"].ToString();
            if (!System.IO.Directory.Exists(Server.MapPath("~/marketingdocuments/" + N_TOUR_ID.ToString() + "/")))
                System.IO.Directory.CreateDirectory(Server.MapPath("~/marketingdocuments/" + N_TOUR_ID.ToString() + "/"));
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                try
                {
                    //System.IO.File.Copy(Server.MapPath("~/marketingdocuments/" + TourId.ToString() + ds.Tables[0].Rows[i]["DESCRIPTION"].ToString()), Server.MapPath("~/marketingdocuments/" + ds.Tables[0].Rows[i]["ATTACHMENT"].ToString()));
                    System.IO.File.Copy(Server.MapPath("~/marketingdocuments/" + TourId.ToString() + "/" + TourId.ToString() + ds.Tables[0].Rows[i]["DESCRIPTION"].ToString()), Server.MapPath("~/marketingdocuments/" + N_TOUR_ID.ToString() + "/" + ds.Tables[0].Rows[i]["ATTACHMENT"].ToString()));
                }
                catch (Exception ex) { }
            }

        }
 public void InsertUpdateCruise(ArrayList arr)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     arr.Insert(15, Session["empid"].ToString());
     objempentity.InsertUpdateTourCruiseDetail(arr);
 }
        public void AssignCountry(int TourId, ArrayList Country)
        {
            TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
            objempentity.AssignCountry(TourId, Country.ToString());

        }
 public void InsertUpdateTransportDetails(ArrayList tTour)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.InsertUpdateTransportDetails(tTour);
 }
 public void InsertUpdateHotelDetails(ArrayList tTour)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     tTour.Insert(33, Session["empid"].ToString());
     objempentity.InsertUpdateHotelDetails(tTour);
 }
 public void InsertUpdateTourQuote(ArrayList tTour)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     tTour.Insert(20, Session["usersid"].ToString());
     objempentity.InsertUpdateTourQuote(tTour);
 }
 public void DeleteTourByTourID(int TourID)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.deleteTour(TourID);
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            tourid = int.Parse(Page.Request.QueryString["key"].ToString());
            if (!IsPostBack)
            {
                TourmasterStoreprocedures objtourentity = new TourmasterStoreprocedures();
                DataSet ds = objtourentity.getdataforuploaddetails(tourid);

                allcountry.DataSource = ds.Tables[0];
                allcountry.DataBind();
                allcountry.DataTextField = "COUNTRY_NAME";
                allcountry.DataValueField = "COUNTRY_ID";
                
                allcitytravel.DataSource = ds.Tables[1];
                allcitytravel.DataBind();
                allcitytravel.DataTextField = "CITY_NAME";
                allcitytravel.DataTextField = "CITY_ID";

                allstartendcity.DataSource = ds.Tables[1];
                allstartendcity.DataBind();
                allstartendcity.DataTextField = "CITY_NAME";
                allstartendcity.DataValueField = "CITY_ID";

               for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
               {
                   try
                   {
                       if (ds.Tables[2].Rows[0]["COUNTRIES_FOR_VISA_TEXT"].ToString().Contains(ds.Tables[0].Rows[i]["COUNTRY_NAME"].ToString().Trim()))
                       {
                           ListItem item = new ListItem(ds.Tables[0].Rows[i]["COUNTRY_NAME"].ToString());
                           Selectedcountry.Items.Add(item);
                       }
                   }
                   catch (Exception ex) { }
               }
               for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
               {
                   try
                   {
                       if (ds.Tables[3].Rows[0]["CITY_TEXT"].ToString().Contains(ds.Tables[1].Rows[i]["CITY_NAME"].ToString().Trim()))
                       {
                           ListItem item = new ListItem(ds.Tables[1].Rows[i]["CITY_NAME"].ToString());
                           SelectedTravel.Items.Add(item);
                       }
                   }
                   catch (Exception ex) { }
               }
               for (int i = 0; i < ds.Tables[1].Rows.Count; i++)
               {
                   try
                   {

                       if (ds.Tables[4].Rows[0]["START_END_CITY_TEXT"].ToString().Contains(ds.Tables[1].Rows[i]["CITY_NAME"].ToString().Trim()))
                       {
                           ListItem item = new ListItem(ds.Tables[1].Rows[i]["CITY_NAME"].ToString());
                           Selectedcity.Items.Add(item);
                       }
                   }
                   catch (Exception ex) { }
               }
                //set anchor to all document
               for (int j = 0; j < ds.Tables[5].Rows.Count; j++)
               {
                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupfulldetail" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancfulldetail.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkfulldetail.Checked = true;
                      
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupfulldetail")
                   {
                       ancfulldetail.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkfulldetail.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupitenary" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancitenary.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkitenary.Checked = true;   
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupitenary")
                   {
                       ancitenary.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkitenary.Checked = false;  
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupCharges" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       anccharged.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkcharges.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupCharges")
                   {
                       anccharged.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkcharges.Checked = false;
                   }
                   
                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupComparision" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       anccomparision.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkcomparision.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupComparision")
                   {
                       anccomparision.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkcomparision.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupCondition" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       anccondition.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkcondition.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupCondition")
                   {
                       anccondition.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkcondition.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupCost" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       anccost.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkcost.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupCost")
                   {
                       anccost.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkcost.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupDetails" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancdetails.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkdetails.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupDetails")
                   {
                       ancdetails.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkdetails.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupfinalItenary" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancfinalitenary.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkfinalitenary.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupfinalItenary")
                   {
                       ancfinalitenary.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkfinalitenary.Checked = false;
                   }
                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupGuidelines" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancguidline.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkguidelines.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupGuidelines")
                   {
                       ancguidline.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkguidelines.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupHighlights" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       anchighlight.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkhighlights.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupHighlights")
                   {
                       anchighlight.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkhighlights.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupLimitations" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       anclimitations.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chklimitations.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupLimitations")
                   {
                       anclimitations.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chklimitations.Checked = false;
                   }
                   
                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupNotes" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancnotes.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chknotes.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupNotes")
                   {
                       ancnotes.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chknotes.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupSheet" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancsheet.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chksheet.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupSheet")
                   {
                       ancsheet.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chksheet.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupTerms" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancterms.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkterms.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupTerms")
                   {
                       ancterms.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkterms.Checked = false;                       
                   }
                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupTermsCondition" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       anctermsandcondition.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkfinalcondition.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupTermsCondition")
                   {
                       anctermsandcondition.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkfinalcondition.Checked = false;
                   }

                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupUSP" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancusp.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkusp.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupUSP")
                   {
                       ancusp.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkusp.Checked = false;
                   }
                   
                   if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupVouchures" && ds.Tables[5].Rows[j]["IS_DEFAULT_DOC"].ToString() == "1")
                   {
                       ancvoucheres.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkvouchures.Checked = true;
                   }
                   else if (ds.Tables[5].Rows[j]["TITLE"].ToString() == "flupVouchures")
                   {
                       ancvoucheres.HRef = "~/marketingdocuments/" + tourid + "/" + ds.Tables[5].Rows[j]["ATTACHMENT"].ToString();
                       chkvouchures.Checked = false;
                   }
               }
            }
        }