protected void Page_Load(object sender, EventArgs e)
        {
            docid = int.Parse(Page.Request.QueryString["key"].ToString());
            if (!IsPostBack)
            {

                SupplierGuidePriceStoredProcedure objinsertdoc = new SupplierGuidePriceStoredProcedure();
                DataSet ds = objinsertdoc.getGuidePriceDocument(docid);
                guidedoc.HRef = "~/SupplierGuideDocument/" + docid + "/" + ds.Tables[0].Rows[0]["UPLOAD_RATE_DOCUMENT"].ToString();
            }
        }
        public void CopyData(int Supplierid)
        {
            SupplierGuidePriceStoredProcedure objguidecopy = new SupplierGuidePriceStoredProcedure();
            System.Data.DataSet ds = objguidecopy.CopyData(Supplierid);
            // string N_TOUR_ID = ds.Tables[0].Rows[0]["TOUR_ID"].ToString();

        }
        public string InsertUpdateGuidePrice(ArrayList GuidePrice,string s)
        {

            SupplierGuidePriceStoredProcedure objinsertguideprice = new SupplierGuidePriceStoredProcedure();
            GuidePrice.Insert(17, Session["usersid"].ToString());
            System.Data.DataSet ds1 = objinsertguideprice.CheckValidation();

            int j = 0;
            int k = 0;
            int l = 0;
            int n = 0;
            int q = 0;


            for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
            {

                if (ds1.Tables[0].Rows[i]["CURRENCY_NAME"].ToString().Equals(GuidePrice[12]) || GuidePrice[12].Equals(""))
                {
                    j = 1;
                    break;

                }

            }
            for (int i = 0; i < ds1.Tables[1].Rows.Count; i++)
            {

                if (ds1.Tables[1].Rows[i]["CHAIN_NAME"].ToString().Equals(GuidePrice[5]) || GuidePrice[5].Equals(""))
                {
                    k = 1;
                    break;

                }

            }
            for (int i = 0; i < ds1.Tables[2].Rows.Count; i++)
            {

                if (ds1.Tables[2].Rows[i]["PAYMENT_TERMS"].ToString().Equals(GuidePrice[13]) || GuidePrice[13].Equals(""))
                {
                    l = 1;
                    break;

                }

            }
            for (int i = 0; i < ds1.Tables[4].Rows.Count; i++)
            {

                if (ds1.Tables[4].Rows[i]["AGENT"].ToString().Equals(GuidePrice[4]) || GuidePrice[4].Equals(""))
                {
                    n = 1;
                    break;

                }

            }

            for (int i = 0; i < ds1.Tables[8].Rows.Count; i++)
            {

                if (ds1.Tables[8].Rows[i]["CITY_NAME"].ToString().Equals(GuidePrice[14]) || GuidePrice[14].Equals(""))
                {
                    q = 1;
                    break;

                }

            }

            if (j == 0)
            {
                s = "currency";
            }
            else if (j == 1 && k == 0)
            {
                s = "Guide_Company";
            }
            else if (j == 1 && k == 1 && l == 0)
            {
                s = "Payment";
            }
            else if (j == 1 && k == 1 && l == 1 && n == 0)
            {
                s = "agent";
            }
            else if (j == 1 && k == 1 && l == 1 && n == 1 && q == 0)
            {
                s = "City";
            }
            else if (j == 1 && k == 1 && l == 1 && n == 1 && q == 1)
            {
                System.Data.DataSet ds = objinsertguideprice.InsertUpdateGuidePrice(GuidePrice);
                s = ds.Tables[0].Rows[0]["ABC"].ToString();
            }
            else
            {

            }
            return s;
        }
 public void delGuidePrice(int GuidePriceid)
 {
     SupplierGuidePriceStoredProcedure objdelguideprice = new SupplierGuidePriceStoredProcedure();
     objdelguideprice.delGuidePrice(GuidePriceid);
 }