private void UplaodDetails_Click(object sender, EventArgs e) { string email = comboBox1.Text.ToString(); if (comboBox1.Text.ToString() == " -----SELECT-----") { MessageBox.Show("Please Select Emailid from dropdrow list"); } else { Globaltxtemail.txtemail = email; Cursor.Current = Cursors.WaitCursor; btnSubmit.Visible = true; count++; // for (int i = 0; i < 10; i++) // { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(txtCarID.Text); //List<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); //UsedCarsSearch obj = new UsedCarsSearch(); //obUsedCarsInfo = (List<com.unitedcarexchange.UsedCarsInfo>)obj.FindCarID(txtCarID.Text); if (Website == "CarPosts") { popform.popform1.BringToFront(); IWebSites objClass = new CarPosts(); label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); UplaodDetails.Enabled = false; Cursor.Current = Cursors.Default; } else if (Website == "JustgoodCars") { UplaodDetails.Enabled = false; popform.popform2.BringToFront(); Cursor.Current = Cursors.WaitCursor; if (count == 3) { if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise1.php") { UplaodDetails.Enabled = false; } } if (count == 4) { // label12.Font = new System.Drawing.Font("Verdana", 8.0f, //System.Drawing.FontStyle.Bold); // btnSubmit.Enabled = true; UplaodDetails.Enabled = false; } // btnSubmit.Visible = false; // if( webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/members_index.php") // if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/members_index.php") // { // label26.Font = new System.Drawing.Font("Verdana", 8.0f, //System.Drawing.FontStyle.Bold); // } if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise.php") { label6.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnSubmit.Visible = false; } if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise1.php") { label8.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnSubmit.Visible = true; // UplaodDetails.Enabled = false; } //MessageBox.Show(buttonCount.ToString()); if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/sign-in.php") { label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); } // if (i == 0) // { if (count == 1) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); webBrowser1.Navigate("http://www.justgoodcars.com/members/advertise.php"); } //} // if (i == 1) // { if (count == 1) { webBrowser1.Navigate("http://www.justgoodcars.com/members/advertise.php"); btnSubmit.Visible = false; UplaodDetails.Enabled = true; } // } // if (i == 2) // { if (count == 2) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); UplaodDetails.Enabled = true; } // } // if (i == 3) // { if (count == 3) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); } //} // if (i == 4) // { if (count == 4) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); } // } // if (i == 5) // { if (count == 5) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); } // } // if (i == 6) // { if (count == 6) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); } //} // if (i == 7) // { if (count == 7) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); } // } Cursor.Current = Cursors.Default; } //else if (Website == "classifiedsforfree") //{ // IWebSites objClass = new ClassifiedsForFree(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} else if (Website == "clazorg") { popform.popform4.BringToFront(); Cursor.Current = Cursors.WaitCursor; IWebSites objClass = new ClazOrg(); if (webBrowser1.Url.ToString() == "http://claz.org/classifieds/post") { label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnSubmit.Visible = true; UplaodDetails.Enabled = false; } objClass.carpostfunc(webBrowser1, obUsedCarsInfo); Cursor.Current = Cursors.Default; } //else if (Website == "americanclassifieds") //{ // IWebSites objClass = new AmericanClassifieds(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "postfreeadshere") //{ // IWebSites objClass = new PostFreeAdshere(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} else if (Website == "Usadsciti") { popform.popform5.BringToFront(); Cursor.Current = Cursors.WaitCursor; // if (i == 0) // { IWebSites objClass = new Usadsciti(); label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); btnSubmit.Visible = true; Cursor.Current = Cursors.Default; UplaodDetails.Enabled = false; // } } else if (Website == "UsNetads") { popform.popform3.BringToFront(); Cursor.Current = Cursors.WaitCursor; // if (i == 0) // { IWebSites objClass = new UsnetAds(); label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); objClass.carpostfunc(webBrowser1, obUsedCarsInfo); btnSubmit.Visible = true; btnSubmit.Enabled = true; UplaodDetails.Enabled = false; Cursor.Current = Cursors.Default; // } } //else if (Website == "FreeAutoShopper") //{ // IWebSites objClass = new FreeAutoShopper(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "Locate Any Auto") //{ // IWebSites objClass = new LocateAnyAuto(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "FreeAddList") //{ // IWebSites objClass = new FreeAddList(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "autoii") //{ // IWebSites objClass = new Autoii(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "ebayclassifieds") //{ // IWebSites objClass = new ebayclassifieds(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "biggestclassifieds") //{ // IWebSites objClass = new biggestclassifieds(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "ClassifiedAds") //{ // IWebSites objClass = new ClassifiedAdds(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "Locanto") //{ // IWebSites objClass = new Locanto(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "75vn") //{ // IWebSites objClass = new Vn75(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "adoos") //{ // IWebSites objClass = new adoos(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "fastautosale") //{ // IWebSites objClass = new fastautosales(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "Sell.com") //{ // IWebSites objClass = new Sell(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "Sellmycar") //{ // IWebSites objClass = new Sellmycar(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "recycler") //{ // IWebSites objClass = new Recycler(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "classifiedsciti") //{ // IWebSites objClass = new classifiedsciti(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "classifiedsvalley") //{ // IWebSites objClass = new classifiedsvalley(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "collectorcarads") //{ // IWebSites objClass = new collectorcarads(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} ////else if (Website == "cardaddy") ////{ //// IWebSites objClass = new cardaddy(); //// objClass.carpostfunc(webBrowser1, obUsedCarsInfo); ////} //else if (Website == "a1classiccars") //{ // IWebSites objClass = new a1classiccars(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "usa.motoseller.com") //{ // IWebSites objClass = new Motoseller(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "list2click") //{ // IWebSites objClass = new list2click(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "us.boss33.com") //{ // IWebSites objClass = new Boss33(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "carsforsale") //{ // IWebSites objClass = new carsforsale(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "cathaylist") //{ // IWebSites objClass = new cathaylist(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "backpage") //{ // IWebSites objClass = new backpage(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "adlandpro") //{ // IWebSites objClass = new adlandpro(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "highlandclassifieds") //{ // IWebSites objClass = new highlandclassifieds(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "glasyads") //{ // IWebSites objClass = new glasyads(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "epage") //{ // IWebSites objepage = new epage(); // objepage.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "kedna") //{ // IWebSites objkedna = new kedna(); // objkedna.carpostfunc(webBrowser1, obUsedCarsInfo); //} //else if (Website == "freeadsinus") //{ // IWebSites objkedna = new freeadsinus(); // objkedna.carpostfunc(webBrowser1, obUsedCarsInfo); //} // } } }
private void btnback_Click(object sender, EventArgs e) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(txtCarID.Text); //if (Convert.ToInt32(cnt) > 2) //{ // btnback.Enabled = true; // string ex = label19.Text; // char[] sepem = { '-' }; // string[] msplit = ex.Split(sepem); // cnt = msplit[1].ToString(); // cnt = cnt.Replace(".jpeg", " "); // cnt = cnt.Replace(".jpg", " "); // int c = Convert.ToInt32(cnt) - 3; // int d = Convert.ToInt32(cnt) - 2; // int b = Convert.ToInt32(cnt) - 1; // //List<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // //UsedCarsSearch obj = new UsedCarsSearch(); // //obUsedCarsInfo = (List<com.unitedcarexchange.UsedCarsInfo>)obj.FindCarID(txtCarID.Text); // if (cnt == "7 ") // { // btnForward.Enabled = true; // //CreateImageURLPath(Pics.GetPic3(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-" + c + "", obUsedCarsInfo[0].Carid.ToString()); // //CreateImageURLPath(Pics.GetPic4(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-" + d + "", obUsedCarsInfo[0].Carid.ToString()); // //CreateImageURLPath(Pics.GetPic5(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-" + b + "", obUsedCarsInfo[0].Carid.ToString()); // pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + c + "" + ".jpeg"; // label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + c + "" + ".jpeg"; // pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + d + "" + ".jpeg"; // label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + d + "" + ".jpeg"; // pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + b + "" + ".jpeg"; // label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + b + "" + ".jpeg"; // } // if (cnt == "4 ") // { // btnback.Enabled = false; // btnForward.Enabled = true; // //CreateImageURLPath(Pics.GetPic0(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-" + c + "", obUsedCarsInfo[0].Carid.ToString()); // //CreateImageURLPath(Pics.GetPic1(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-" + d + "", obUsedCarsInfo[0].Carid.ToString()); // //CreateImageURLPath(Pics.GetPic3(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-" + b + "", obUsedCarsInfo[0].Carid.ToString()); // pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + c + "" + ".jpeg"; // label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + c + "" + ".jpeg"; // pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + d + "" + ".jpeg"; // label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + d + "" + ".jpeg"; // pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + b + "" + ".jpeg"; // label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + b + "" + ".jpeg"; // } //} //---------------------- string ex = label21.Text; char[] sepem = { '-' }; string[] msplit = ex.Split(sepem); cnt = msplit[1].ToString(); cnt = cnt.Replace(".jpeg", ""); cnt = cnt.Replace(".jpg", ""); int cntt = Convert.ToInt32(cnt); switch (imgcount) { case 1: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = ""; label21.Text = ""; break; case 2: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = ""; break; case 3: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; break; case 4: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; if (cnt == "4") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 5: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; if (cnt == "5") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 6: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; if (cnt == "6") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 7: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; if (cnt == "7") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 8: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; if (cnt == "8") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") //else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 9: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; if (cnt == "9") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") //else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") //else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 10: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; if (cnt == "10") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6+ "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 11: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; // if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg") if(cnt=="11") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8+ "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } // if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") if(cnt=="9") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } // if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") if(cnt=="6") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } // if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +3 + "" + ".jpeg") if(cnt=="3") { } break; case 12: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; if (cnt == "12") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 13: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; if (cnt == "13") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; } if (cnt == "12") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "12") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { } break; case 14: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; if (cnt == "14")// if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; } if (cnt == "12") //else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 15: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; if (cnt == "15") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; } if (cnt == "12") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 16: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; if (cnt == "16") // if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; } if (cnt == "15") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; } if (cnt == "12") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 17: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +16 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17+ "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg"; if (cnt == "17") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; } if (cnt == "15") //else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; } if (cnt == "12") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 18: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +17 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg"; if (cnt == "18") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; } if (cnt == "15") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12+ "" + ".jpeg"; } if (cnt == "12") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 19: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18+ "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 19 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 19 + "" + ".jpeg"; if (cnt == "19") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 19 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +18 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg"; } if (cnt == "18") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18+ "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +15 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; } if (cnt == "15") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; } if (cnt == "12") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; case 20: pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +19 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 20 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +19 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +20 + "" + ".jpeg"; if (cnt == "20") //if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 20 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 16 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 17 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg"; } if (cnt == "18") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 18 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 13 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 14 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg"; } if (cnt == "15") //else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 15 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 10 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 11 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg"; } if (cnt == "12") //else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 12 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 7 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 8 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg"; } if (cnt == "9") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 9 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" +6 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 4 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 5 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg"; } if (cnt == "6") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 6 + "" + ".jpeg") { pictureBox1.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; pictureBox2.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; pictureBox3.ImageLocation = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; label19.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 1 + "" + ".jpeg"; label20.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 2 + "" + ".jpeg"; label21.Text = @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg"; } if (cnt == "3") // else if (pictureBox3.ImageLocation == @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + 3 + "" + ".jpeg") { } break; } //----------------------- }
private void btnGetAllPics_Click(object sender, EventArgs e) { //btnForward.Visible = true; // btnback.Visible = true; if (imgcount > 3) { btnforward.Visible = true; btnback.Visible = true; lblimages.Text = imgcount.ToString() + " Images downloaded "; } try { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(txtCarID.Text); //List<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); //UsedCarsSearch obj = new UsedCarsSearch(); //obUsedCarsInfo = (List<com.unitedcarexchange.UsedCarsInfo>)obj.FindCarID(txtCarID.Text); Cursor.Current = Cursors.WaitCursor; lblpics.Visible = false; CreateImageURLPath(Pics.GetPic3(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-4", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic4(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-5", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic5(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-6", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic6(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-7", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic7(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-8", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic8(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-9", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic9(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-10", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic10(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-11", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic11(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-12", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic12(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-13", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic13(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-14", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic14(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-15", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic15(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-16", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic16(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-17", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic17(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-18", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic18(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-19", obUsedCarsInfo[0].Carid.ToString()); CreateImageURLPath(Pics.GetPic19(obUsedCarsInfo), obUsedCarsInfo[0].Carid.ToString() + "-20", obUsedCarsInfo[0].Carid.ToString()); // lblimgcount.Visible = true ; MessageBox.Show("All Images downloaded successfully"); Cursor.Current = Cursors.Default; // --------------------- // int fileSize = (int)new System.IO.FileInfo(filePath).Length; // @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + c + "" + ".jpeg"; for (int i = 4; i <= 20; i++) { string filePath= @"C:\UcePictures\" + obUsedCarsInfo[0].Carid.ToString() + "\\" + obUsedCarsInfo[0].Carid.ToString() + "-" + i + "" + ".jpeg"; int fileSize = (int)new System.IO.FileInfo(filePath).Length; if (fileSize != 0) { imgcount++; } } //------------------ } catch (Exception ex) { MessageBox.Show("All Images downloaded successfully"); } btnGetAllPics.Visible = false; lblimages.Visible = true; lblimages.Text = imgcount.ToString() +" Images downloaded "; if (imgcount > 3) { btnback.Visible = true; btnforward.Visible = true; } }
private void GetCarDetails_Click(object sender, EventArgs e) { string number = txtCarID.Text; Regex regex = new Regex(@"[\d]"); if (regex.IsMatch(number)) { // ((Main)this.ParentForm).postToolStripMenuItem.Enabled = true; // ((Main)this.MdiParent)..Enabled = false; //true // if (txtCarID.Text == "") //{ // MessageBox.Show("Enter Carid"); //} // Main main = new Main(); // popform.objfrm2.Controls["postToolStripMenuItem"].Enabled = true; Globalcarid.txtCarID = Convert.ToInt32(txtCarID.Text); // servicetimer++; // 1000 X 15 // int servicecount0 = servicecount % 2000; Cursor.Current = Cursors.WaitCursor; // dtgridSubDet.Visible = true; objsubdetailsinfo.CarId = txtCarID.Text; DataSet dsSubDet = new DataSet(); btnGetdetails.Enabled = false; label28.Visible = true; btnGetAllPics.Visible = true; lblsubdetails.Visible = true; btnback.Visible = false; btnforward.Visible = false; cbBoxWebsite.Visible = true; btnSubmit.Visible = true; lblwebsite.Visible = true; if (txtCarID.Text == "") { // dtgridSubDet.Visible = false; MessageBox.Show("Please Enter Car Id"); btnGetdetails.Enabled = false; lblwebsite.Visible = false; cbBoxWebsite.Visible = false; btnSubmit.Visible = false; btnGetdetails.Enabled = true; } UplaodDetails.Visible = false; btnSubmit.Visible = false; cbBoxWebsite.ResetText(); webBrowser1.Navigate("about:blank"); try { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(txtCarID.Text); FillCarDetails(obUsedCarsInfo); // panel1.Visible = true; carid = Convert.ToInt32(txtCarID.Text); dsSubDet = objSubmitionDetailsBL.GetSubmitionDetailsByCarId(carid); if (dsSubDet.Tables[0].Rows.Count == 0) { // dtgridSubDet.Visible = false; lblsubdetails.Visible = false; } else { // dtgridSubDet.Visible = true; // dtgridSubDet.AutoGenerateColumns = true; // dtgridSubDet.DataSource = dsSubDet.Tables[0]; // lblsubdetails.Text = "Car Id " + txtCarID.Text + " Submitted Details :"; } // button2.Visible = true; panel1.Visible = true; cbBoxWebsite.Enabled = true; DataSet Eds = new DataSet(); Eds = objSubmitionDetailsBL.GetEmailData(); comboBox1.DataSource = Eds.Tables[0]; comboBox1.DisplayMember = Eds.Tables[0].Columns["EmailId"].ToString(); comboBox1.ValueMember = Eds.Tables[0].Columns["Password"].ToString(); //comboBox1.Items.Insert(0, new Items("--Select--", "0")); Cursor.Current = Cursors.Default; } catch (Exception ex) { // MessageBox.Show("I am Sorry we cannot provide you the service .Please contact Our Administrator"); } } else { MessageBox.Show(" enter carid"); } }
public void GetCarDetails(string carid) { // circularProgressControl1.Start(); try { // pnlposttkt.Visible = true; comboBox1.Text = ""; //pnlpostnotes.Visible = true; button2.Visible = false; label30.Visible = false; label27.Visible = false; label28.Visible = false; label29.Visible = false; label31.Visible = false; label32.Visible = false; comboBox2.Visible = false; button5.Visible = false; button7.Visible = false; pnlpoststeps.Visible = false; pnlpostnotes.Visible = false; webBrowser1.Visible = false; pnlpostbuttons.Visible = false; string txtcarid = textBox3.Text; //if (txtcarid != "") //{ //string number = textBox.Text; //Regex regex = new Regex(@"[\d]"); //if (regex.IsMatch(number)) //{ Cursor.Current = Cursors.WaitCursor; //circularProgressControl2.Visible = true; //circularProgressControl2.Start(); //circularProgressControl2.BringToFront(); try { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(carid); if (obUsedCarsInfo.Count > 0) { FillCarDetails(obUsedCarsInfo); int rctcarid = Convert.ToInt32(carid.ToString()); DataSet dsSubDet = new DataSet(); dsSubDet = objSubmitionDetailsBL.GetSubmitionDetailsByCarId(rctcarid); dgvpostforpostedcarid.DataSource = dsSubDet.Tables[0]; DataGridViewColumn column1 = dgvpostforpostedcarid.Columns[0]; column1.Width = 20; if (dsSubDet.Tables[0].Rows.Count == 0) { dgvpostforpostedcarid.Visible = true; label48.Text = "Zero Posts For this Carid"; label48.Visible = true; } else { label48.Visible = false; dgvpostforpostedcarid.Visible = true; } panel1.Visible = false; label35.Visible = true; label36.Visible = true; label37.Visible = true; label38.Visible = true; label41.Visible = true; label40.Visible = true; //btnGetAllPics.Visible = true; label38.Visible = true; label39.Visible = true; comboBox1.Visible = true; comboBox1.Text = ""; lblpostsite.Visible = true; label39.ForeColor = Color.Green; label38.ForeColor = Color.Green; // comboBox2.Visible = false; textBox2.Visible = false; lblemail.Visible = false; label25.Visible = false; button4.Visible = false; button6.Visible = false; btnpostsubmit.Visible = false; btnpostupload.Visible = false; btnuploadtolive.Visible = false; //} // else // { // MessageBox.Show("CarId not found .Please try with another Carid"); // comboBox1.Text = ""; // label38.Visible = false; // label39.Visible = false; // lblimages.Visible = false; // btnGetAllPics.Visible = false; // btnback.Visible = false; // btnforward.Visible = false; // pictureBox1.Visible = false; // pictureBox2.Visible = false; // pictureBox3.Visible = false; // dgvpostforpostedcarid.Visible = false; // pnlpostcardata.Visible = false; // pnlpostnotes.Visible = false; // pnlposttkt.Visible = false; // pnlpostbuttons.Visible = false; // pnlpoststeps.Visible = false; // webBrowser1.Visible = false; // label40.Visible = false; // label41.Visible = false; // panel1.Visible = true; // textBox3.Text = ""; // textBox3.Focus(); // } //} //catch (Exception ex) //{ // comboBox1.Text = ""; // label38.Visible = false; // label39.Visible = false; // lblimages.Visible = false; // btnGetAllPics.Visible = false; // btnback.Visible = false; // btnforward.Visible = false; // pictureBox1.Visible = false; // pictureBox2.Visible = false; // pictureBox3.Visible = false; // dgvpostforpostedcarid.Visible = false; // pnlpostcardata.Visible = false; // pnlpostnotes.Visible = false; // pnlposttkt.Visible = false; // pnlpostbuttons.Visible = false; // pnlpoststeps.Visible = false; // webBrowser1.Visible = false; // label40.Visible = false; // label41.Visible = false; // panel1.Visible = true; // textBox3.Text = ""; // textBox3.Focus(); //} pnlpostcardata.Visible = true; pnlpostnotes.Visible = true; pnlposttkt.Visible = true; pnlpoststeps.Visible = true; pnlpostbuttons.Visible = true; pnlpostbrowser.Visible = true; // pnlpostpics.Visible = true; int count = 0; DataSet dsemail = new DataSet(); dsemail = objSubmitionDetailsBL.MultiGetEmailByCarid(carid); if (dsemail.Tables.Count > 0) { if (dsemail.Tables[0].Rows.Count > 0) { foreach (DataRow dr in dsemail.Tables[0].Rows) { if(dr["EmailId"].ToString().Contains("americantravelexpert")) { count++; } } if (count != 0) { comboBox2.DataSource = dsemail.Tables[0]; comboBox2.DisplayMember = dsemail.Tables[0].Columns["EmailId"].ToString(); textBox2.Text = dsemail.Tables[0].Rows[0]["Password"].ToString(); } else { string state = obUsedCarsInfo[0].State.ToString().Trim(); string NewEmail = General.EmailCreation.createmail(label10.Text, state); string password = "******"; objSubmitionDetailsBL.MultiSaveEmail(NewEmail.Trim(), password.Trim(), label10.Text); DataSet Newml = new DataSet(); Newml = objSubmitionDetailsBL.MultiGetEmailByCarid(carid); if (Newml.Tables.Count > 0) { if (dsemail.Tables[0].Rows.Count > 0) { comboBox2.DataSource = Newml.Tables[0]; comboBox2.DisplayMember = Newml.Tables[0].Columns["EmailId"].ToString(); textBox2.Text = Newml.Tables[0].Rows[0]["Password"].ToString(); } } } } else { //create email start string state = obUsedCarsInfo[0].State.ToString().Trim(); string NewEmail = General.EmailCreation.createmail(label10.Text, state); string password = "******"; objSubmitionDetailsBL.MultiSaveEmail(NewEmail.Trim(), password.Trim(), label10.Text); //create email end //getEmail start DataSet Newml = new DataSet(); Newml = objSubmitionDetailsBL.MultiGetEmailByCarid(carid); if (Newml.Tables.Count > 0) { if (dsemail.Tables[0].Rows.Count > 0) { comboBox2.DataSource = Newml.Tables[0]; comboBox2.DisplayMember = Newml.Tables[0].Columns["EmailId"].ToString(); textBox2.Text = Newml.Tables[0].Rows[0]["Password"].ToString(); } } //Getemailend } } DataSet dsnotebtn = new DataSet(); int btncarid = Convert.ToInt32(carid); dsnotebtn = objSubmitionDetailsBL.GetMultiNote(btncarid); if (dsnotebtn.Tables.Count > 0) { if (dsnotebtn.Tables[0].Rows.Count > 0) { for (int i = 0; i < dsnotebtn.Tables[0].Rows.Count; i++) { textBox4.Text += dsnotebtn.Tables[0].Rows[i]["Note"].ToString() + "\r\n"; } } else { textBox4.Text = ""; } } DataSet pudds = new DataSet(); pudds = objSubmitionDetailsBL.MultiSiteGetRecentPostDataByCarId(carid); if (pudds.Tables.Count > 0) { if (pudds.Tables[0].Rows.Count > 0) { label34.Text = pudds.Tables[0].Rows[0]["Publisheddt"].ToString(); } else { label34.Text = "Not Published"; } } DataSet dssitename = new DataSet(); dssitename = objSubmitionDetailsBL.MultiGetSiteList(); comboBox1.DataSource = dssitename.Tables[0]; comboBox1.DisplayMember = dssitename.Tables[0].Columns["SiteName"].ToString(); comboBox1.ValueMember = dssitename.Tables[0].Columns["SmrtzSiteID"].ToString(); //int tcarid=Convert.ToInt32(textBox3.Text); //dssitename = objSubmitionDetailsBL.MultiGetSiteNameTransation(tcarid); //comboBox1.DataSource = dssitename.Tables[0]; //comboBox1.DisplayMember = dssitename.Tables[0].Columns["SiteName"].ToString(); //comboBox1.ValueMember = dssitename.Tables[0].Columns["SmrtzSiteID"].ToString(); //DataSet tktds = new DataSet(); //tktds = objSubmitionDetailsBL.MultiGetTicketCountByCarId(carid); //if (tktds.Tables.Count > 0) //{ // if (tktds.Tables[0].Rows.Count > 0) // { // label37.Text = tktds.Tables[0].Rows[0]["#tkts"].ToString(); // } // else // { // label37.Text = "0"; // } //} //else //{ // label37.Text = "0"; //} //if (pudds.Tables.Count > 0) //{ // if (pudds.Tables[0].Rows.Count > 0) // { // string crstatus = pudds.Tables[0].Rows[0]["Status"].ToString(); // if (crstatus == "Paid") // { // label39.Text = "Published"; // } // else // { // label39.Text = "Not Published"; // } // } // else // { // label39.Text = "Not Published"; // } //} //else //{ // label39.Text = "Not Published"; //} comboBox2.Text = ""; textBox2.Text = ""; //------------------------------------------------------------------- } else { // MessageBox.Show("CarId not found .Please try with another Carid"); comboBox1.Text = ""; label38.Visible = false; label39.Visible = false; lblimages.Visible = false; btnGetAllPics.Visible = false; btnback.Visible = false; btnforward.Visible = false; pictureBox1.Visible = false; pictureBox2.Visible = false; pictureBox3.Visible = false; dgvpostforpostedcarid.Visible = false; pnlpostcardata.Visible = false; pnlpostnotes.Visible = false; pnlposttkt.Visible = false; pnlpostbuttons.Visible = false; pnlpoststeps.Visible = false; webBrowser1.Visible = false; label40.Visible = false; label41.Visible = false; panel1.Visible = true; MessageBox.Show("CarId not found .Please try with another Carid", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); textBox3.Text = ""; textBox3.Focus(); } } catch (Exception ex) { comboBox1.Text = ""; label38.Visible = false; label39.Visible = false; lblimages.Visible = false; btnGetAllPics.Visible = false; btnback.Visible = false; btnforward.Visible = false; pictureBox1.Visible = false; pictureBox2.Visible = false; pictureBox3.Visible = false; dgvpostforpostedcarid.Visible = false; pnlpostcardata.Visible = false; pnlpostnotes.Visible = false; pnlposttkt.Visible = false; pnlpostbuttons.Visible = false; pnlpoststeps.Visible = false; webBrowser1.Visible = false; label40.Visible = false; label41.Visible = false; panel1.Visible = true; textBox3.Text = ""; textBox3.Focus(); MessageBox.Show("CarId not found.Please try another CarId", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); } //} // else // { // MessageBox.Show(" Enter Carid "); // textBox3.Text = ""; // } ////} //else //{ // MessageBox.Show("Please Enter Any carId "); // textBox3.Text = ""; //} DataGridViewColumn clmpostgrdmn0 = dgvpostforpostedcarid.Columns[0]; clmpostgrdmn0.Width = 20; DataGridViewColumn clmpostgrdmn1 = dgvpostforpostedcarid.Columns[1]; clmpostgrdmn1.Width = 80; DataGridViewColumn clmpostgrdmn2 = dgvpostforpostedcarid.Columns[2]; clmpostgrdmn2.Width = 75; return; // pnlpostnotes.Visible = true; } catch (Exception ex) { // MessageBox.Show("CarId not found.Please try another CarId"); comboBox1.Text = ""; label38.Visible = false; label39.Visible = false; lblimages.Visible = false; btnGetAllPics.Visible = false; btnback.Visible = false; btnforward.Visible = false; pictureBox1.Visible = false; pictureBox2.Visible = false; pictureBox3.Visible = false; dgvpostforpostedcarid.Visible = false; pnlpostcardata.Visible = false; pnlpostnotes.Visible = false; pnlposttkt.Visible = false; pnlpostbuttons.Visible = false; pnlpoststeps.Visible = false; webBrowser1.Visible = false; label40.Visible = false; label41.Visible = false; panel1.Visible = true; textBox3.Text = ""; textBox3.Focus(); } Cursor.Current = Cursors.Default; //circularProgressControl1.Stop(); }
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { //btnuploadtolive.Visible = true; //btnuploadtolive.Enabled = true; Cursor.Current = Cursors.WaitCursor; int u = 0; if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) // if ((this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) || (this.webBrowser1.ReadyState == WebBrowserReadyState.Interactive)) { // for (int Loop = 100; Loop >= 5; Loop -= 10) // { // } int cscnt = 0; if (comboBox1.Text == "usadsciti") { cscnt++; } if (comboBox1.Text == "www.adsciti.com") { adccnt++; } if (comboBox1.Text == "CarPosts") { #region CarPosts if (webBrowser1.Url.ToString() == "http://www.carposts.com/") { GeneralFunction.LinkInvoke(webBrowser1, "Post Free Ad"); } if (webBrowser1.Url.ToString() == "http://www.carposts.com/AutoEdit.php?SaveAuto=AddNew&Type=For Sale") { int cpst = 0; foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "If you are misusing our site than know that you have been logged."; if (element.OuterText == InnerTxt) { cpst++; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); MessageBox.Show("This Site is not allowing to post ad with your ip address."); } } if (cpst == 0) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } } if (webBrowser1.Url.ToString() == "http://www.carposts.com/AutoEdit.php") { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "Use Agreement / Terms Conditions"; if (element.OuterText == InnerTxt) { btnpostsubmit.Enabled = false; label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label31.ForeColor = System.Drawing.Color.Red; btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; } } } } #endregion } if (comboBox1.Text == "autoii") { #region autoii if (webBrowser1.Url.ToString() == "http://www.autoii.com/auto/index2.html") { GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); } if (webBrowser1.Url.ToString() == "http://www.autoii.com/auto/AutoEdit.php?SaveAuto=AddNew&Type=For Sale") { int auti = 0; foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "If you are misusing our site than know that you have been logged."; if (element.OuterText == InnerTxt) { auti++; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); MessageBox.Show("This Site is not allowing to post ad with your ip address."); } } if (auti == 0) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } } if (webBrowser1.Url.ToString() == "http://www.autoii.com/auto/AutoEdit.php") { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "Use Agreement / Terms Conditions"; if (element.OuterText == InnerTxt) { btnpostsubmit.Enabled = false; label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; } } } } #endregion } if (comboBox1.Text == "Clazorg") { #region Claz if (webBrowser1.Url.ToString() == "http://claz.org/classifieds/post") { if (clz == 1) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } } string check = string.Empty; if ((webBrowser1.Url.ToString() != "http://claz.org/classifieds/post") ) { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "Back"; if (element.OuterText == InnerTxt) { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; check = webBrowser1.Url.ToString(); } } } if (webBrowser1.Url.ToString() == "http://claz.org/classifieds/save") { //if (webBrowser1.Url.ToString() == check) // { btnuploadtolive.Enabled = false; // } } #endregion } if (comboBox1.Text == "usadsciti") { #region usadsciti //circularProgressControl2.Start(); //pnlpostcardata.Visible = true; //circularProgressControl2.Visible = true; panel2.Visible = true; if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://www.usadsciti.com/publish-a-new-ad.htm") { if (cscnt == 1) { // if (adsty == 0) // { // { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "TERMS OF SERVICE"; if (element.OuterText == InnerTxt) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); pnlpostcardata.Visible = true; circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); cscnt++; } } //cscnt++; // } } } if (cscnt == 1) { // string nk = webBrowser1.Url.ToString(); if (webBrowser1.Url.ToString() == "http://www.usadsciti.com/publish-a-new-ad.htm") { btnpostsubmit.Enabled = true; } } if (webBrowser1.Url.ToString() != "http://www.usadsciti.com/publish-a-new-ad.htm") { int adc = 0; foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "TERMS OF SERVICE"; if (element.OuterText == InnerTxt) { adc++; } } if (adc >= 1) { } else { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label29.ForeColor = System.Drawing.Color.Red; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; circularProgressControl2.Stop(); pnlpostcardata.Visible = true; label49.Visible = false; panel2.Visible = false; circularProgressControl2.Visible = false; //} } } #region old //if (webBrowser1.Url.ToString() == "http://www.usadsciti.com/publish-a-new-ad.htm") //{ // if (asad == 1) // { // asad++; // circularProgressControl2.Start(); // panel2.Visible = true; // circularProgressControl2.Visible = true; // } //} //if (webBrowser1.Url.ToString() != "http://www.usadsciti.com/publish-a-new-ad.htm") //{ // foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) // { // string InnerTxt = "Report bad use or Spam"; // if (element.OuterText == InnerTxt) // { // btnuploadtolive.Enabled = true; // btnuploadtolive.Visible = true; // } // } //} #endregion } #endregion } if (comboBox1.Text == "adsciti") { #region adsciti if (webBrowser1.Url.ToString() == "http://www.adsciti.com/publish-a-new-ad.htm") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "TERMS OF SERVICE"; if (element.OuterText == InnerTxt) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } } } if (webBrowser1.Url.ToString() != "http://www.adsciti.com/publish-a-new-ad.htm") { int adc = 0; foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "TERMS OF SERVICE"; if (element.OuterText == InnerTxt) { adc++; } } if (adc >= 1) { circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; btnpostsubmit.Enabled = true; } else { label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label31.ForeColor = System.Drawing.Color.Red; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; } } #endregion } if (comboBox1.Text == "UsNetads") { #region usnetads if (webBrowser1.Url.ToString() == "http://www.usnetads.com/") { this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); GeneralFunction.LinkInvoke(webBrowser1, "Click Here to Post Ads"); } if (webBrowser1.Url.ToString() == "http://www.usnetads.com/post/post-free-ads.php") { btnpostupload.Enabled = true; btnpostupload.Visible = true; //btnpostupload.Enabled = true; //btnpostupload.Visible = true; //this.Opacity = 100; //circularProgressControl2.Stop(); //circularProgressControl2.Visible = false; //panel2.Visible = false; //this.Refresh(); } if (webBrowser1.Url.ToString() == "http://www.usnetads.com/post/post-free-ads-op.php") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("p")) { string InnerTxt = "Congratulations! You have posted the advertisement successfully."; if (element.OuterText.Contains(InnerTxt)) { //GeneralFunction.LinkInvoke(webBrowser1, InnerTxt8); label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnpostsubmit.Enabled = false; btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; //com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); //IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); //obUsedCarsInfo = objService.FindCarID(label10.Text); //string InnerTxt8 = obUsedCarsInfo[0].YearOfMake.ToString() + " " + obUsedCarsInfo[0].Make.ToString() + " " + obUsedCarsInfo[0].Model.ToString(); //foreach (HtmlElement element1 in webBrowser1.Document.GetElementsByTagName("a")) //{ // if (element1.InnerText.Contains(InnerTxt8)) // { // } //} } else { //MessageBox.Show("Entered invalid data.Please check the data again"); //webBrowser1.Navigate("http://www.usnetads.com/post/post-free-ads.php"); // btnpostupload.Enabled = true; // btnpostupload.Visible = true; } } foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("div")) { string InnerTxt = "Failed to post your advertisement because of following error:"; string outer = element.OuterText; //if (outer.Contains(InnerTxt)) if (outer.Contains(InnerTxt)) { if (msg == 0) { msg++; MessageBox.Show("Invalid Data Entered.Please Click start button Again and check the data.", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); webBrowser1.Navigate("http://www.usnetads.com/post/post-free-ads.php"); btnpostupload.Enabled = true; btnpostupload.Visible = true; btnpostsubmit.Enabled = false; } } } } //if (webBrowser1.Url.ToString() == "http://www.usnetads.com/post/post-free-ads-op.php") //{ // // foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("")) // // { // //if (element.OuterText.Contains(InnerTxt)) // //{ // //} // // } //} #endregion } else if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/sign-in.php") { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } else if (webBrowser1.Url.ToString() == data5) { button4.Visible = true; button4.Enabled = true; button6.Visible = true; button6.Enabled = true; } //---------------justgoodcars Start------------- if (comboBox1.Text == "JustgoodCars") { #region justgoodcars com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/members_index.php") { if (comboBox1.Text == "JustgoodCars") { if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/members_index.php") { // foreach (HtmlElement htmlElement in webBrowser1.Document.Links) // { // linkItem = htmlElement.GetAttribute("HREF").ToString(); // } //// } // } // else // { GeneralFunction.HfClickInvoke(webBrowser1, "/images/btn-logout.gif"); webBrowser1.Navigate("http://www.justgoodcars.com/sign-in.php"); comboBox1.Text = ""; webBrowser1.Navigate(""); } //} } } if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { //for make and model if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise.php") { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } } if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { //for car details if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise1.php") { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.ButtonClickInvoke(webBrowser1, "submit"); } } if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { //to click image upload button if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise_preview.php") { if (ic == 0) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } } } if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise_preview.php") { //to click free button if (ic == 2) { } } } if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/adverts_edit_image-upload.php") { //to click try upload button if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { GeneralFunction.LinkInvoke(webBrowser1, "Try this Simple Upload Tool"); } } if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { //to click browsebutton image if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/adverts_edit_image.php") { ic++; if (ic == 1) { GeneralFunction.FileUploadInvoke(webBrowser1, "userfile"); btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } //to click back button after uploading image if (ic == 2) { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnpostsubmit.Enabled = false; } if (ic == 2) { if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/adverts_edit_image.php") { GeneralFunction.ButtonClickInvokeValue(webBrowser1, "< Back"); } } } } if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise_preview.php") { if (ic == 2) { f++; if (f == 1) { GeneralFunction.ButtonClickInvokeValue(webBrowser1, "FREE >");//SubmitButton for GoLive justgoodcars webBrowser1.Navigate("http://www.justgoodcars.com/members/members_index.php"); webBrowser1.Navigate("http://www.justgoodcars.com/members/adverts.php"); } } } } if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/adverts.php") { GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, "View / Edit"); btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; } } if (webBrowser1.Url.ToString() == data5) { } #region old //if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) //{ // if (ic == 3) // { // if (webBrowser1.Url.ToString() == "http://www.justgoodcars.com/members/advertise_preview.php") // { // btnlive.Enabled = true; // int i = 0; // GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, "View / Edit"); // foreach (HtmlElement htmlElement in webBrowser1.Document.Links) // { // i++; // if (i == 8) // { // string tabItem = htmlElement.InnerText; // linkItem = htmlElement.GetAttribute("HREF").ToString(); // label26.Font = new System.Drawing.Font("Verdana", 8.0f, // System.Drawing.FontStyle.Bold); // webBrowser1.Navigate("http://www.justgoodcars.com/members/members_index.php"); // //webBrowser1.Navigate("http://www.justgoodcars.com/"); // } // btnSubmit.Enabled = true; // } // } // } //} #endregion #endregion } //--------------justgoodcars End---------------- //-----------------kugli start------------------------- if (comboBox1.Text == "kugli") { #region kugli if (webBrowser1.Url.ToString() == "http://www.kugli.com/business/def/post-edit-classified-ad/catid/2/") { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } } if (Kug == 1) { if (webBrowser1.Url.ToString() == "http://www.kugli.com/business/def/post-edit-classified-ad/catid/2/") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new Kugli(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } } #endregion } //-----------------kugli end------------------------- //-----------------Jeanza start------------------------- if (comboBox1.Text == "jeanza") { #region jeanza if (webBrowser1.Url.ToString() == "http://www.jeanza.com/publish-a-new-ad.htm") { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (jnga == 0) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; } } } if (webBrowser1.Url.ToString() == "http://www.jeanza.com/publish-a-new-ad.htm") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { string InnerTxt = "Click here for Free Classified Ads Website."; if (element.OuterText == InnerTxt) { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } } } } if (jnga == 1) { // btnuploadtolive.Visible = true; // btnuploadtolive.Enabled = true; } #endregion } //-----------------Jeanza end------------------------- //-----------------Classifiedvally start------------------------- if (comboBox1.Text == "classifiedsvalley")//done { #region classifiedsvalley old //if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/") //{ // if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) // { // btnpostupload.Enabled = true; // btnpostupload.Visible = true; // this.Opacity = 100; // circularProgressControl2.Stop(); // circularProgressControl2.Visible = false; // panel2.Visible = false; // this.Refresh(); // } //} //// //if (Globalstname.stname == "oregon") // Globalstname.stname = "oklahoma"; //// //if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/") //{ // //com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // //IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // //obUsedCarsInfo = objService.FindCarID(label10.Text); // //IWebSites objClass = new classifiedsvalley(); // //objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); // GeneralFunction.LinkInvoke(webBrowser1, "Change City"); // circularProgressControl2.Stop(); // panel2.Visible = false; // circularProgressControl2.Visible = false; // MessageBox.Show("Please Select City Manually"); //} //// //if (Globalstname.stname == "oklahoma") // Globalstname.stname = "oregon"; //// //if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/choose-classified-ad-location.php") //{ } //string valyurl = webBrowser1.Url.ToString(); //if (Globalstname.stname != "california") //{ // if (valyurl.Contains("_")) // { // // http://www.classifiedsvalley.com/alaska/10_Homer/ // int index1 = valyurl.IndexOf(".com/"); // int end1 = valyurl.Length; // valyurl = valyurl.ToString().Substring(index1, end1 - index1); // valyurl = valyurl.Replace(".com/", ""); // int index2 = valyurl.IndexOf("/"); // int end2 = valyurl.Length; // valyurl = valyurl.ToString().Substring(index2, end2 - index2); // valyurl = valyurl.Replace("/", ""); // int index3 = 0; // int end3 = valyurl.IndexOf("_"); // cityno = valyurl.ToString().Substring(index3, end3 - index3); // cityno = cityno.Replace("_", ""); // } //} //if (Globalstname.stname == "california") //{ // if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/") // { // btnpostupload.Enabled = true; // btnpostupload.Visible = true; // this.Opacity = 100; // circularProgressControl2.Stop(); // circularProgressControl2.Visible = false; // panel2.Visible = false; // this.Refresh(); // GeneralFunction.LinkInvoke(webBrowser1, "Change City"); // } // if (valyurl.Contains("_")) // { // // http://www.classifiedsvalley.com/alaska/10_Homer/ // int index1 = valyurl.IndexOf(".com/"); // int end1 = valyurl.Length; // valyurl = valyurl.ToString().Substring(index1, end1 - index1); // valyurl = valyurl.Replace(".com/", ""); // int index2 = 0; // int end2 = valyurl.Length; // valyurl = valyurl.ToString().Substring(index2, end2 - index2); // valyurl = valyurl.Replace("/", ""); // int index3 = 0; // int end3 = valyurl.IndexOf("_"); // cityno = valyurl.ToString().Substring(index3, end3 - index3); // cityno = cityno.Replace("_", ""); // } // if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/choose-classified-ad-location.php") // { // MessageBox.Show("Please Select City Manually"); // } // // http://www.classifiedsvalley.com/372_San_Francisco/ // if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + valyurl + "/") // { // GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); // } // if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + "index.php?view=post&cityid=" + cityno + "&lang=en") // { // GeneralFunction.LinkInvokeClassifiedValley(webBrowser1, "Vehicles"); // } // if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4") // { // com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // obUsedCarsInfo = objService.FindCarID(label10.Text); // int year = Convert.ToInt32(obUsedCarsInfo[0].YearOfMake.ToString()); // if (rb_Vans.Checked) // { // GeneralFunction.LinkInvoke(webBrowser1, "Vans"); // } // else if (rb_Trucks.Checked) // { // GeneralFunction.LinkInvoke(webBrowser1, "Trucks"); // } // else // { // if (year < 1991) // { // GeneralFunction.LinkInvoke(webBrowser1, "Classic Cars"); // } // else // GeneralFunction.LinkInvoke(webBrowser1, "Cars"); // } // } // if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=65" // || webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=67" // || webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=69" // || webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=68") // { // if (cvy == 0) // { // com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // obUsedCarsInfo = objService.FindCarID(label10.Text); // GeneralFunction.FileUploadInvoke(webBrowser1, "pic[]"); // circularProgressControl2.Stop(); // panel2.Visible = false; // circularProgressControl2.Visible = false; // IWebSites objClass = new classifiedsvalley(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); // btnpostsubmit.Visible = true; // btnpostsubmit.Enabled = true; // cvy++; // } // } // if ((webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=65&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=65&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=67&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=67&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=68&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=68&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=69&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=69&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&")) // //if (webBrowser1.Url.ToString() != "http://www.classifiedsvalley.com/" + Globalstname.stname ); // { // int clsfd = 0; // foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) // { // string InnerTxt = "Back to Home"; // if (element.OuterText == InnerTxt) // { // clsfd++; // label29.Font = new System.Drawing.Font("Verdana", 8.0f, // System.Drawing.FontStyle.Bold); // label29.ForeColor = System.Drawing.Color.Red; // btnpostsubmit.Enabled = false; // btnuploadtolive.Visible = true; // btnuploadtolive.Enabled = true; // } // } // if (clsfd == 0) // { // if (vlly == 0) // { // vlly++; // MessageBox.Show("Enter Security Code and Check All the fields ", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); // GeneralFunction.CheckedInvoke(webBrowser1, "agree"); // btnpostsubmit.Enabled = true; // GeneralFunction.FileUploadInvoke(webBrowser1, "pic[]"); // } // } // } //} //if (valyurl.Contains("_")) //{ //} //if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + valyurl + "/") //{ // circularProgressControl2.Start(); // panel2.Visible = true; // circularProgressControl2.Visible = true; // GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); //} //string test = "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "index.php?view=post&cityid=" + cityno + "&lang=en"; //if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "index.php?view=post&cityid=" + cityno + "&lang=en") //{ // //com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // //IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // //obUsedCarsInfo = objService.FindCarID(label10.Text); // // http://www.classifiedsvalley.com/kentucky/index.php?view=post&cityid=1&lang=en // //IWebSites objClass = new classifiedsvalley(); // //objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); // GeneralFunction.LinkInvokeClassifiedValley(webBrowser1, "Vehicles"); //} //if ((webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4") || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "?view=post&cityid=" + cityno + "&lang=en&catid=2")) //{ // com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // obUsedCarsInfo = objService.FindCarID(label10.Text); // int yearnw = Convert.ToInt32(obUsedCarsInfo[0].YearOfMake.ToString()); // if (rb_Vans.Checked) // { // GeneralFunction.LinkInvoke(webBrowser1, "Vans"); // } // else if (rb_Trucks.Checked) // { // GeneralFunction.LinkInvoke(webBrowser1, "Trucks"); // } // else // { // if (yearnw < 1991) // { // GeneralFunction.LinkInvoke(webBrowser1, "Classic Cars"); // } // else // { // //if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4") // //{ // // GeneralFunction.LinkInvoke(webBrowser1, "Cars"); // //} // //com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // //IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // //obUsedCarsInfo = objService.FindCarID(label10.Text); // ////http://www.classifiedsvalley.com/kentucky/?view=post&cityid=1&lang=en&catid=4 // //IWebSites objClass = new classifiedsvalley(); // //objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); // GeneralFunction.LinkInvoke(webBrowser1, "Cars"); // } // } //} //if ((webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=65") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=69") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "?view=post&cityid=" + cityno + "&lang=en&catid=2&subcatid=17") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "?view=post&cityid=" + cityno + "&lang=en&catid=2&subcatid=21") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=67") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/" + "?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=68")) //{ // // http://www.classifiedsvalley.com/kentucky/?view=post&cityid=1&lang=en&catid=4&subcatid=65 // if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) // { // if (cvy == 0) // { // cvy++; // com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // obUsedCarsInfo = objService.FindCarID(label10.Text); // circularProgressControl2.Stop(); // panel2.Visible = false; // circularProgressControl2.Visible = false; // GeneralFunction.FileUploadInvoke(webBrowser1, "pic[]"); // IWebSites objClass = new classifiedsvalley(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); // btnpostsubmit.Visible = true; // btnpostsubmit.Enabled = true; // } // } //} //// http://www.classifiedsvalley.com/alabama/index.php?view=post&cityid=1&lang=en&catid=2&subcatid=17&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=& //string sfsd = "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=1&lang=en&catid=4&subcatid=65&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&"; //string sfsd1 = "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=65&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&"; //string sfsd2 = "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=65&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&"; //if ((webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=65&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=65&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=69&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=69&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=67&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=67&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=68&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=4&subcatid=68&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=2&subcatid=17&adid=0&imgid=0&countryid=0&areaid=0&pos=0&picid=0&page=0&foptid=0&eoptid=0&pricemin=0&pricemax=0&") // || (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/" + Globalstname.stname + "/index.php?view=post&cityid=" + cityno + "&lang=en&catid=2&subcatid=21&adid=&imgid=&countryid=&areaid=&pos=&picid=&page=&foptid=&eoptid=&pricemin=&pricemax=&")) ////if (webBrowser1.Url.ToString() != "http://www.classifiedsvalley.com/" + Globalstname.stname ); //{ // int clsfd = 0; // foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) // { // string InnerTxt = "Back to Home"; // if (element.OuterText == InnerTxt) // { // clsfd++; // label29.Font = new System.Drawing.Font("Verdana", 8.0f, // System.Drawing.FontStyle.Bold); // label29.ForeColor = System.Drawing.Color.Red; // btnpostsubmit.Enabled = false; // btnuploadtolive.Visible = true; // btnuploadtolive.Enabled = true; // } // } // if (clsfd == 0) // { // if (vlly == 0) // { // vlly++; // MessageBox.Show("Enter Security Code and Check All the fields ", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); // GeneralFunction.CheckedInvoke(webBrowser1, "agree"); // btnpostsubmit.Enabled = true; // GeneralFunction.FileUploadInvoke(webBrowser1, "pic[]"); // } // } //} #endregion #region classifiedsvalley com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); string username = comboBox2.Text; Char[] seprt = { '@' }; string[] splitemail = username.Split(seprt); username = splitemail[0].ToString(); string statename1 = StateName.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State.ToString(), obUsedCarsInfo[0].Carid.ToString()); if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/") { GeneralFunction.LinkInvoke(webBrowser1, "Register"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/register.php") { GeneralFunction.SetTextValue(webBrowser1, "c[firstname]", "uce"); GeneralFunction.SetTextValue(webBrowser1, "c[lastname]", "urve"); GeneralFunction.SetTextValue(webBrowser1, "c[address]", obUsedCarsInfo[0].City.ToString() + " " + obUsedCarsInfo[0].State.ToString() + " " + obUsedCarsInfo[0].Zip.ToString()); GeneralFunction.SetTextValue(webBrowser1, "c[city]", obUsedCarsInfo[0].City.ToString()); GeneralFunction.SetTextValue(webBrowser1, "c[zip]", obUsedCarsInfo[0].Zip.ToString()); SelectOption(webBrowser1, statename1, "c[state]"); GeneralFunction.SetTextValue(webBrowser1, "c[email]", comboBox2.Text); GeneralFunction.SetTextValue(webBrowser1, "c[email_verifier]", comboBox2.Text); GeneralFunction.SetTextValue(webBrowser1, "c[username]", username); GeneralFunction.SetTextValue(webBrowser1, "c[password]", textBox2.Text); GeneralFunction.SetTextValue(webBrowser1, "c[password_confirm]", textBox2.Text); GeneralFunction.RadioSetValue(webBrowser1, "c[business_type]", "1"); GeneralFunction.RadioSetValue(webBrowser1, "c[agreement]", "yes"); GeneralFunction.ButtonClickInvoke(webBrowser1, "submit"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/register.php?b=1") { //foreach (HtmlElement el in webBrowser1.Document.GetElementsByTagName("h1")) //{ // if (webBrowser1.Document.GetElementById("h1").InnerText == "Confirm Your Registration") // webBrowser1.Navigate("http://www.gmail.com"); // else // webBrowser1.Refresh(); //} //Txt_Url.Text = "http://www.gmail.com"; Txt_Url.Visible = true; Navigate_btn.Visible = true; } //if (webBrowser1.Url.ToString() == "https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=http://mail.google.com/mail/&scc=1<mpl=default<mplcache=2&emr=1") //{ // if (webBrowser1.ReadyState == WebBrowserReadyState.Complete) // { // GeneralFunction.SetTextValue(webBrowser1, "Email", "*****@*****.**"); // GeneralFunction.SetTextValue(webBrowser1, "Passwd", "carsales*123*"); // GeneralFunction.ButtonClickInvoke(webBrowser1, "signIn"); // Txt_Url.Visible = true; // Navigate_btn.Visible = true; // } //} if (webBrowser1.Url.ToString().Contains("b=3")) //webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart" //|| webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=4" //|| { Txt_Url.Visible = false; Navigate_btn.Visible = false; GeneralFunction.LinkInvoke(webBrowser1, "CLICK HERE"); //GeneralFunction.LinkInvoke(webBrowser1, "Post an ad (free)"); //GeneralFunction.LinkInvoke(webBrowser1, "New Classified"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php") { GeneralFunction.LinkInvoke(webBrowser1, "Post an ad (free)"); GeneralFunction.LinkInvoke(webBrowser1, "New Classified"); } if(webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart") { GeneralFunction.LinkInvoke(webBrowser1, "New Classified"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&action=new&main_type=classified") { GeneralFunction.spanLinkInvoke1(webBrowser1, "Vehicles"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&main_type=classified&step=classified:category&b=15&action=process") { if (rb_Trucks.Checked) { GeneralFunction.spanLinkInvoke1(webBrowser1, "Trucks"); } else if (rb_Vans.Checked) { GeneralFunction.spanLinkInvoke1(webBrowser1, "Minivans"); } else GeneralFunction.spanLinkInvoke1(webBrowser1, "Cars"); //spanLinkInvoke1(webBrowser1, "Trucks"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&main_type=classified&step=classified:category&b=212&action=process") { webBrowser1.Navigate("http://www.classifiedsvalley.com/index.php?a=cart&main_type=classified&step=classified:category&b=212&c=terminal&action=process"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&main_type=classified&step=classified:category&b=196&action=process" || webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&main_type=classified&step=classified:category&b=305&action=process" || webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&main_type=classified&step=classified:category&b=212&c=terminal&action=process") { IWebSites ob = new classifiedsvalley1(); GeneralFunction.SetDropDownNameandValue(webBrowser1, "b[classified_length]", "62"); ob.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); //GeneralFunction.SetTextValue(webBrowser1, "b[classified_title]", obUsedCarsInfo[0].YearOfMake.ToString() + " " + obUsedCarsInfo[0].Make.ToString() + " " + obUsedCarsInfo[0].Model.ToString()); //GeneralFunction.SetMultiTextValue(webBrowser1, "b[description]", "Make: Ford\r\nModel: F250\r\nyear: 1995\r\nPrice: $7000\r\nMileage: 95000.00\r\n\n\nDescription: Runs and drives w ell 95,000 original miles 7.3 Turbo diesel have canopy for it as w ell 4253816458..!! If intrested\r\nContact : 4253816458..!!!For More Details: http://UnitedCarExchange.com/a1/1995-Ford-F250-271755505317"); //GeneralFunction.SetTextValue(webBrowser1, "b[question_value][92]", "jagadeesh"); //GeneralFunction.SetTextValue(webBrowser1, "b[question_value][93]", "jagadeesh"); //GeneralFunction.SetTextValue(webBrowser1, "b[price]", "jagadeesh"); //GeneralFunction.ButtonClickInvoke(webBrowser1, "submit"); //GeneralFunction.SetTextValue(webBrowser1, "b[classified_title]", "jagadeesh"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&action=process&main_type=classified&step=classified:details") { //spanLinkInvoke2(webBrowser1, "normalUploaderShowLink"); GeneralFunction.spanLinkInvoke1(webBrowser1, "click here"); GeneralFunction.FileUploadInvoke(webBrowser1, "d[1]"); GeneralFunction.FileUploadInvoke(webBrowser1, "d[2]"); GeneralFunction.FileUploadInvoke(webBrowser1, "d[3]"); GeneralFunction.ButtonClickInvoke(webBrowser1, "submit"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&action=process&main_type=classified&step=images:upload_images" || webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&action=process&main_type=classified&step=images:upload_images&useLegacyUploader=1&no_ssl_force=1") { GeneralFunction.ButtonClickInvoke(webBrowser1, "c[no_images]"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&action=process&main_type=classified&step=images:upload_images&useLegacyUploader=1&no_ssl_force=1") { GeneralFunction.ButtonClickBody2(webBrowser1, "Process Queue"); btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; } if (webBrowser1.Url.ToString() == "http://www.classifiedsvalley.com/index.php?a=cart&action=process&main_type=cart&step=cart") { GeneralFunction.LinkInvoke(webBrowser1, "Logout"); } //GeneralFunction.LinkInvoke(webBrowser1, statename); #endregion } //-----------------Classifiedvally end------------------------- //-----------------Classifiedciti start------------------------- if (comboBox1.Text == "classifiedsciti") { #region classifiedsciti circularProgressControl2.Start(); circularProgressControl2.Visible = true; panel2.Visible = true; if (webBrowser1.Url.ToString() == "http://www.classifiedsciti.com/publish-a-new-ad.htm") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "TERMS OF SERVICE"; if (element.OuterText == InnerTxt) { tabControl1.Enabled = true; btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; pnlpostcardata.Visible = true; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } } } if (webBrowser1.Url.ToString() != "http://www.classifiedsciti.com/publish-a-new-ad.htm") { if (webBrowser1.Url.ToString() != "http://just98.justhost.com/suspended.page/disabled.cgi/classifiedsciti.com") { int clc = 0; foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "TERMS OF SERVICE"; if (element.OuterText == InnerTxt) { clc++; } } if (clc >= 1) { } else { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label29.ForeColor = System.Drawing.Color.Red; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; //} } } } if (webBrowser1.Url.ToString() == "http://just98.justhost.com/suspended.page/disabled.cgi/classifiedsciti.com") { circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; MessageBox.Show("This Site under maintance.Please select another Site.", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } #endregion } //-----------------Classifiedciti end------------------------- //-----------------USA.Motoseller start------------------------- if (comboBox1.Text == "usa.motoseller.com") { #region usa.motoseller.com if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=10&c=a*is*1") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "click here to log out"; if (element.OuterText == InnerTxt) { moto++; GeneralFunction.LinkInvokeClassifiedValley(webBrowser1, "click here to log out"); } } if (moto == 0) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } //foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) //{ // string fgf = webBrowser1.Url.ToString(); // string InnerTxt = "click here to log out"; // if (element.OuterText == InnerTxt) // { // GeneralFunction.LinkInvokeClassifiedValley(webBrowser1, "click here to log out"); // webBrowser1.Navigate(""); // comboBox1.Text = ""; // } // else // { // btnpostupload.Enabled = true; // btnpostupload.Visible = true; // } //} // btnpostsubmit.Visible = true; // btnpostsubmit.Enabled = true; } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=10") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "click here to log out"; if (element.OuterText == InnerTxt) { moto++; GeneralFunction.LinkInvokeClassifiedValley(webBrowser1, "click here to log out"); } } } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=10") { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { IWebSites objClass = new Motoseller(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "Post a FREE Ad!"; if (element.OuterText == InnerTxt) { GeneralFunction.LinkInvokeClassifiedValley(webBrowser1, "Post a FREE Ad!"); moto = 0; //if(int motosl==0) //{ motosl++; MessageBox.Show("Please Click Start Button Again", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); label27.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Regular); //} } } } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=1") { IWebSites objClass = new Motoseller(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=1&b=302&set_cat=1") { IWebSites objClass = new Motoseller(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=1&b=307&c=category&set_cat=1") { statenamemoto = GetStatesMotoseller.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State.ToString(), obUsedCarsInfo[0].Carid.ToString()); if (statenamemoto != "") { char[] spldata = { ',' }; string[] msplit = statenamemoto.Split(spldata); stNamemoto = msplit[0].ToString(); // stName1moto = stNamemoto + " ".ToString(); stcdemoto = msplit[1].ToString(); GeneralFunction.LinkInvokeMotoSellerStateName(webBrowser1, "category_links", stNamemoto); //IWebSites objClass = new Motoseller(); //objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); } } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=1&b=" + stcdemoto + "&c=category&set_cat=1") { circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; label49.Visible = false; IWebSites objClass = new Motoseller(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=1&set_details=1") { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { GeneralFunction.FileUploadInvoke(webBrowser1, "d[1]"); btnpostsubmit.Enabled = false; } } if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=1&set_details=1") { GeneralFunction.ButtonClickInvoke(webBrowser1, "c[no_images]"); } } if (webBrowser1.Url.ToString() == "http://usa.motoseller.com/c/sys.php?a=1&set_images=1") { GeneralFunction.LinkInvoke(webBrowser1, "Approve this ad"); btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; label28.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); // GeneralFunction.LinkInvokeClassifiedValley(webBrowser1, "Log Out"); } } #endregion } //-----------------USA.Motoseller End------------------------- //-----------------American start------------------------- if (comboBox1.Text == "American-classifieds.net") { #region American-classifieds.net if (webBrowser1.Url.ToString() == "http://www.american-classifieds.net/") { GeneralFunction.LinkInvoke(webBrowser1, "Post Ads"); } if (webBrowser1.Url.ToString() == "http://www.american-classifieds.net/postad.php") { //if (webBrowser1.Document.GetElementById("title").InnerText != "") { GeneralFunction.LinkInvoke(webBrowser1, "POST REGULAR AD"); } } if (webBrowser1.Url.ToString() == "http://www.american-classifieds.net/postad.php?submittype=0&categ=") { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } } if (comboBox1.Text == "American-classifieds.net") { int amc = 0; int amc1 = 0; foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { if (webBrowser1.Url.ToString() != "http://www.american-classifieds.net/postad.php") { if (webBrowser1.Url.ToString() != "http://www.american-classifieds.net/") { if (webBrowser1.Url.ToString() != "http://www.american-classifieds.net/postad.php") { if (webBrowser1.Url.ToString() != "http://www.american-classifieds.net/postad.php?submittype=0&categ=") { if (webBrowser1.Url.ToString() != "http://www.american-classifieds.net/") { if (amc1 == 0) { circularProgressControl2.Start(); circularProgressControl2.Visible = true; panel2.Visible = true; btnpostsubmit.Enabled = false; string fgf = webBrowser1.Url.ToString(); string InnerTxt = "Accent List"; if (element.OuterText == InnerTxt) { if (amc == 0) { amc1++; label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; label31.ForeColor = System.Drawing.Color.Red; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; amc++; } } } } } } } } } if (amc >= 1) { } else { if (amc1 == 1) { circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; btnpostsubmit.Enabled = false; btnpostupload.Enabled = true; MessageBox.Show("Email has been used already.Please select the site again and change emailId."); } } //string recorded = webBrowser1.Url.ToString(); //if (recorded.Contains("recorded")) //{ //} if (webBrowser1.Url.ToString() == "http://www.american-classifieds.net/postad.php") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("div")) { string InnerTxt = "An ad was posted from your IP address less than 5 minutes ago."; if (element.OuterText == InnerTxt) { } string fxb = element.OuterText; // if (element.InnerText.Contains(InnerTxt)) // { // } } } } #endregion } //-----------------American End------------------------- //-----------------classifiedsforfree start------------------------- if (comboBox1.Text == "Classifiedsforfree") { #region Classifiedsforfree Globaltxtemail.txtemail = comboBox2.Text; Globalpwd.pwd = textBox2.Text; int cfree = 0; if (webBrowser1.Url.ToString() == "http://www.classifiedsforfree.com/") { // webBrowser1.Navigate("http://www.classifiedsforfree.com/post-ad/State.htm"); GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new ClassifiedsForFree(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, "Post Ad"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsforfree.com/Account/Login?ReturnUrl=/Post") { GeneralFunction.LinkInvoke(webBrowser1, "Register"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsforfree.com/Post") { if (cfreeimg == 0) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new ClassifiedsForFree(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); cfreeimg++; } } if (webBrowser1.Url.ToString() == "http://www.classifiedsforfree.com/Account/Register") { if (cff == 0) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); cff++; IWebSites objClass = new ClassifiedsForFree(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; } if (cff == 1) { //GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); } circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; label49.Visible = false; // GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsforfree.com/#") { GeneralFunction.SpanInnerText(webBrowser1, "US States"); } if (webBrowser1.Url.ToString() == "http://www.classifiedsforfree.com/post-ad/State.htm") { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } if (webBrowser1.Url.ToString() == "http://www.classifiedsforfree.com/submit-ad/State.htm") { if (webBrowser1.Url.ToString() != "http://www.classifiedsforfree.com/post-ad/State.htm") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "YouTube.com"; if (element.OuterText == InnerTxt) { cfree++; MessageBox.Show("Please check the fields again before clicking submit"); } } if (cfree == 0) { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("div")) { string fg = element.InnerHtml; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label29.ForeColor = System.Drawing.Color.Red; } } } } #endregion } //-----------------classifiedsforfree End------------------------- //-----------------epage End------------------------- if (comboBox1.Text == "Epage" || comboBox1.Text == "www.epage.com") { #region epage old //com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); //IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); //obUsedCarsInfo = objService.FindCarID(label10.Text); //if (webBrowser1.Url.ToString() == "http://epage.com/js/post/c0/" //|| (webBrowser1.Url.ToString().Contains("http://epage.com/js/post;") && webBrowser1.Url.ToString().Contains("jsessionid"))) //{ // btnpostupload.Enabled = true; // btnpostupload.Visible = true; // this.Opacity = 100; // circularProgressControl2.Stop(); // circularProgressControl2.Visible = false; // panel2.Visible = false; // this.Refresh(); //} //if (webBrowser1.Url.ToString() != "http://epage.com/js/post") //{ // if (webBrowser1.Url.ToString() != "http://epage.com/js/post?c=0&b=0&process=2&cnum=1100300" // || webBrowser1.Url.ToString() != "http://epage.com/js/post?c=0&b=0&process=2&cnum=1102000") // { // if (webBrowser1.Url.ToString() != "http://epage.com/js/post/c0/") // { // if (webBrowser1.Url.ToString() != "http://epage.com/js/post?c=0") // { // if (epg == 0) // { // IWebSites objClass = new epage(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); // epg1++; // epg++; // } // } // } // } //} //if (webBrowser1.Url.ToString() == "http://epage.com/js/post?c=0&b=0&process=2&cnum=1100300" || webBrowser1.Url.ToString() == "http://epage.com/js/post?c=0&b=0&process=2&cnum=1102000") //{ // IWebSites objClass = new epage(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); // circularProgressControl2.Stop(); // circularProgressControl2.Visible = false; // panel2.Visible = false; //} //if (webBrowser1.Url.ToString() == "http://epage.com/js/post") //{ // if (epg1 == 1) // { // IWebSites objClass = new epage(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); // btnpostsubmit.Enabled = true; // btnpostsubmit.Visible = true; // } //} //if (webBrowser1.Url.ToString() == "http://epage.com/js/post?c=0") //{ // if (subepg == 1) // { // GeneralFunction.ButtonClickByValue(webBrowser1, "Continue"); // epglst++; // subepg++; // label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); // //IWebSites objClass = new epage(); // //objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); // } //} //if (webBrowser1.Url.ToString() == "http://epage.com/js/post") //{ // GeneralFunction.Submit(webBrowser1, " Register "); //} //if (webBrowser1.Url.ToString() == "http://epage.com/js/post?c=0") //{ // if (epglst == 1) // { // GeneralFunction.ButtonClickByValue(webBrowser1, "Yes"); // epg1++; // if (epg1 == 2) // { // circularProgressControl2.Stop(); // panel2.Visible = false; // circularProgressControl2.Visible = false; // } // } //} //if (webBrowser1.Url.ToString() == "http://epage.com/js/post") //{ // if (epg1 == 3) // { // btnpostsubmit.Enabled = false; // } //} //string urlck = webBrowser1.Url.ToString(); //if (urlck.Contains("mi")) //{ // btnuploadtolive.Visible = true; // btnuploadtolive.Enabled = true; //} //if (webBrowser1.Url.ToString() == "http://epage.com/js/account/n0/") //{ // GeneralFunction.LinkInvoke(webBrowser1, "Logout"); //} #endregion #region epage new if (webBrowser1.Url.ToString() == "http://epage.com/js/post/c0/") { GeneralFunction.RadioSetValue(webBrowser1, "place", "pp1100000,0,1100000,Vehicles"); GeneralFunction.ButtonClickByValue(webBrowser1, "Continue"); } else if (webBrowser1.Url.ToString() == "http://epage.com/js/post" || webBrowser1.Url.ToString().Contains("jsessionid")) { epagei++; } else if (webBrowser1.Url.ToString() == "http://epage.com/js/post?c=0&b=0&process=2&cnum=1100300") { GeneralFunction.ButtonClickByValue(webBrowser1, "Continue"); } else if (webBrowser1.Url.ToString() == "http://epage.com/js/post?c=0") { epagej++; } else if (webBrowser1.Url.ToString() == "http://epage.com/js/account/n0/") { GeneralFunction.LinkInvoke(webBrowser1, "Logout"); } //else if (webBrowser1.Url.ToString() == "http://epage.com/js/account/n0/") //{ // GeneralFunction.LinkInvoke(webBrowser1, "Logout"); //} else if (webBrowser1.Url.ToString().Contains("mi")) { btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } if (epagej == 1) { GeneralFunction.ButtonClickByValue(webBrowser1, "Continue"); } else if (epagej > 1) { //GeneralFunction.ButtonClickByValue(webBrowser1, "Yes"); } if (epagei == 1) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new epage(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } else if (epagei == 2) { GeneralFunction.Submit(webBrowser1, " Register "); } else if (epagei == 3) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new epage(); string username = comboBox2.Text; Char[] seprt = { '@' }; string[] splitemail = username.Split(seprt); username = splitemail[0].ToString(); GeneralFunction.SetTextValue(webBrowser1, "loginuserid", username); GeneralFunction.SetTextValue(webBrowser1, "loginemail", comboBox2.Text); GeneralFunction.SetTextValue(webBrowser1, "loginpasswd", textBox2.Text); GeneralFunction.SetTextValue(webBrowser1, "loginfirstname", username); GeneralFunction.SetTextValue(webBrowser1, "loginlastname", username); GeneralFunction.SetDropDownNameandValue(webBrowser1, "logincountry", "151000"); GeneralFunction.SetTextValue(webBrowser1, "loginzip", obUsedCarsInfo[0].Zip.ToString()); } else if (epagei > 3) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new epage(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } #endregion } //-----------------epage End------------------------- //------------Highland start--------------------------- if (comboBox1.Text == "highlandclassifieds")//done { #region highlandclassifieds com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, "Yes"); if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/csp?csp=45757") { GeneralFunction.LinkInvoke(webBrowser1, "Post a New Ad"); //if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/post/c45757") //{ // HLepglst++; btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } // } if (webBrowser1.Url.ToString() != "http://highlandclassifieds.com/js/post") { if (webBrowser1.Url.ToString() != "http://highlandclassifieds.com/js/post?c=0&b=0&process=2&cnum=1100300" || webBrowser1.Url.ToString() != "http://highlandclassifieds.com/js/post?c=0&b=0&process=2&cnum=1102000") { if (webBrowser1.Url.ToString() != "http://highlandclassifieds.com/js/post/c0/") { if (webBrowser1.Url.ToString() != "http://ww1.highlandclassifieds.com/js/post") { if (HLepg == 0) { IWebSites objClass = new highlandclassifieds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); HLepg1++; HLepg++; } } } } } string urlck = webBrowser1.Url.ToString(); if (urlck.Contains("mi")) { btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/post?c=45757&b=45757&process=2&cnum=1100300" || webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/post?c=45757&b=45757&process=2&cnum=1102000") { IWebSites objClass = new highlandclassifieds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; } if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/post") { if ((HLepg1 == 1) || (HLepg1 == 2) || (HLepg1 == 3) || (HLepg1 == 4)) { IWebSites objClass = new highlandclassifieds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, "Continue"); if (HLepg1 == 3) { btnpostupload.Enabled = false; btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } if (HLepg1 == 4) { label28.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnpostsubmit.Enabled = false; } HLepg1++; } } //if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/post?c=0") //{ // if (HLsubepg == 1) // { // GeneralFunction.ButtonClickByValue(webBrowser1, "Continue"); // HLepglst++; // HLsubepg++; // label29.Font = new System.Drawing.Font("Verdana", 8.0f, // System.Drawing.FontStyle.Bold); // //IWebSites objClass = new epage(); // //objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); // } //} if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/post") { GeneralFunction.Submit(webBrowser1, " Register "); } //if (webBrowser1.Url.ToString() == "{http://ww1.highlandclassifieds.com/js/post?c=45757") //{ // GeneralFunction.ButtonClickByValue(webBrowser1, "Yes"); // HLepg1++; // if (HLepg1 == 2) // { // circularProgressControl2.Stop(); // pnlpostcardata.Visible = false; // panel2.Visible = false; // circularProgressControl2.Visible = false; // } //} if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/post?c=45757") { //if (hgcl == 0) //{ hgcl++; //if (hgcl == 1) //{ //string price = obUsedCarsInfo[0].Price.ToString(); //price = "$" + price; // GeneralFunction.SetTextValue(webBrowser1, "price", price); GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, "Continue"); //} this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); // GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, "Continue"); // btnpostsubmit.Enabled = false; // } } if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/account/c45757") { GeneralFunction.LinkInvoke(webBrowser1, "Logout"); } //if (webBrowser1.Url.ToString() == "http://ww1.highlandclassifieds.com/js/post") //{ // if (HLepg1 == 3) // { // btnpostsubmit.Enabled = false; // btnuploadtolive.Visible = true; // btnuploadtolive.Enabled = true; // } //} #endregion } //------------Highland End---------------------------- if (comboBox1.Text == "classifiededition") { #region classifiededition string stName = string.Empty; string stName1 = string.Empty; string stNam = string.Empty; string stcde = string.Empty; string statename = string.Empty; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); statename = GetEditionState.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State.ToString(), obUsedCarsInfo[0].Carid.ToString()); if (statename != "") { char[] spldata = { ',' }; string[] msplit = statename.Split(spldata); stName = msplit[0].ToString(); stNam = msplit[0].ToString(); if (stName == "New York") { stName = stName.Replace(" ", "_"); } stName1 = stNam + " ".ToString(); stcde = msplit[1].ToString(); if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://www.classifiededition.com/") { btnpostupload.Visible = true; btnpostupload.Enabled = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } if (webBrowser1.Url.ToString() == "http://www.classifiededition.com/-2_United_States/") { //com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); //IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); //obUsedCarsInfo = objService.FindCarID(label10.Text); //statename = GetEditionState.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State.ToString(), obUsedCarsInfo[0].Carid.ToString()); //if (statename != "") //{ // char[] spldata = { ',' }; // string[] msplit = statename.Split(spldata); // stName = msplit[0].ToString(); // stName = stName + " ".ToString(); // stcde = msplit[1].ToString(); GeneralFunction.LinkInvoke(webBrowser1, stName1); // GeneralFunction.LinkInvokestate(webBrowser1, stName1); } } if (stName.Contains(" ")) { stName = stName.Replace(" ", "_"); } //if (stName == "New Jersey") //{ // stName = "New_Jersey"; //} //else if (stName == "West Virginia") //{ // stName = "West_Virginia"; //} string gh = "http://www.classifiededition.com/" + stcde + "_" + stName + "/"; if (webBrowser1.Url.ToString() == "http://www.classifiededition.com/" + stcde + "_" + stName + "/") { // {http://www.classifiededition.com/108_Pennsylvania/ GeneralFunction.LinkInvoke(webBrowser1, "Unlimited Free Post"); } if (webBrowser1.Url.ToString() == "http://www.classifiededition.com/index.php?view=post&cityid=" + stcde + "&lang=en&funcountry=" + stcde) { GeneralFunction.LinkInvoke(webBrowser1, "Vehicles"); } if (webBrowser1.Url.ToString() == "http://www.classifiededition.com/?view=post&cityid=" + stcde + "&funcountry=" + stcde + "&lang=en&catid=3") { int year = Convert.ToInt32(obUsedCarsInfo[0].YearOfMake.ToString()); if (rb_Trucks.Checked) { GeneralFunction.LinkInvoke(webBrowser1, "Trucks"); } else { if (year < 1991) { GeneralFunction.LinkInvoke(webBrowser1, "Classic Cars"); } else { GeneralFunction.LinkInvoke(webBrowser1, "Cars"); } } circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; } if ((webBrowser1.Url.ToString() == "http://www.classifiededition.com/?view=post&cityid=" + stcde + "&funcountry=" + stcde + "&lang=en&catid=3&subcatid=50") || (webBrowser1.Url.ToString() == "http://www.classifiededition.com/?view=post&cityid=" + stcde + "&funcountry=" + stcde + "&lang=en&catid=3&subcatid=55") || (webBrowser1.Url.ToString() == "http://www.classifiededition.com/?view=post&cityid=" + stcde + "&funcountry=" + stcde + "&lang=en&catid=3&subcatid=51")) { //if ((clsfd == 0) || (clsfd == 1)) //{ if ((clsfd == 0)) { IWebSites objClass = new ClassifiedEditor(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); clsfd++; btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; } } if ((webBrowser1.Url.ToString() == "http://www.classifiededition.com/index.php?view=post&cityid=" + stcde + "&funcountry=" + stcde + "&lang=en&catid=3&subcatid=50&") || (webBrowser1.Url.ToString() == "http://www.classifiededition.com/index.php?view=post&cityid=" + stcde + "&funcountry=" + stcde + "&lang=en&catid=3&subcatid=55&") || (webBrowser1.Url.ToString() == "http://www.classifiededition.com/index.php?view=post&cityid=" + stcde + "&funcountry=" + stcde + "&lang=en&catid=3&subcatid=51&")) { foreach (HtmlElement htmlElement in webBrowser1.Document.Links) { string InnerTxt = "Back to Home"; if (htmlElement.InnerText == InnerTxt) { if (edi == 0) { edi++; label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label31.ForeColor = System.Drawing.Color.Red; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } } } if (edi == 0) { edi++; MessageBox.Show("Enter Security Code and Check All the fields ", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); GeneralFunction.CheckedInvoke(webBrowser1, "agree"); } } } #endregion } //postfreeadshere.com start----------------------- if (comboBox1.Text == "www.postfreeadshere.com") { #region www.postfreeadshere.com if (webBrowser1.Url.ToString() == "http://www.postfreeadshere.com/publish-a-new-ad.htm") { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { btnpostupload.Enabled = true; btnpostupload.Visible = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } } if (webBrowser1.Url.ToString() != "http://www.postfreeadshere.com/publish-a-new-ad.htm") { foreach (HtmlElement htmlElement in webBrowser1.Document.Links) { string InnerTxt = "No Thanks! - I am ok with the FREE POSTING.."; if (htmlElement.InnerText == InnerTxt) { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label29.ForeColor = System.Drawing.Color.Red; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } } } #endregion } //postfreeadshere.com end----------------------- //cathaylist start------------------------- if (comboBox1.Text == "cathaylist") { #region cathaylist if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://www.cathaylist.com/?view=selectcity&targetview=post&cityid=0&lang=en") { cthy = 0; btnpostupload.Visible = true; btnpostupload.Enabled = false; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } if (webBrowser1.Url.ToString() != "http://www.cathaylist.com/?view=selectcity&targetview=post&cityid=0&lang=en") { if (cthy == 0) { url = webBrowser1.Url.ToString(); if (url.Contains("cityid=")) { int index1 = url.IndexOf("cityid="); int end1 = url.IndexOf("lang="); url = url.ToString().Substring(index1, end1 - index1); url = url.Replace("cityid=", ""); url = url.Replace("&", ""); label27.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); circularProgressControl2.Start(); panel2.Visible = true; circularProgressControl2.Visible = true; } cthy++; } } // string fsg = "http://www.cathaylist.com/?view=post&postevent=&cityid=" + url + "&lang=en&catid=&subcatid="; if (webBrowser1.Url.ToString() == "http://www.cathaylist.com/?view=post&postevent=&cityid=" + url + "&lang=en&catid=&subcatid=") { webBrowser1.Navigate("http://www.cathaylist.com/?view=post&cityid=" + url + "&lang=en&catid=2&subcatid=6&shortcutregion="); } if (webBrowser1.Url.ToString() == "http://www.cathaylist.com/?view=post&cityid=" + url + "&lang=en&catid=2&subcatid=6&shortcutregion=") { Globaltxtemail.txtemail = comboBox2.Text; circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new cathaylist(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } string gfg = "http://www.cathaylist.com/index.php?view=post&cityid=" + url + "&lang=en&catid=2&subcatid=6&shortcutregion=&"; if (webBrowser1.Url.ToString() == "http://www.cathaylist.com/index.php?view=post&cityid=" + url + "&lang=en&catid=2&subcatid=6&shortcutregion=&") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "Back to Home"; if (element.OuterText == InnerTxt) { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } } } } #endregion } //cathaylist end------------------------- if (comboBox1.Text == "www.freeadlists.com") { #region www.freeadlists.com btnpostupload.Visible = true; btnpostupload.Enabled = true; this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); #endregion } if (comboBox1.Text == "adsriver") { #region adsriver //IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); //int year=obUsedCarsInfo[0].YearOfMake; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); if (webBrowser1.Url.ToString() == "http://www.adsriver.com/") { GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); //btnpostupload.Visible = true; //btnpostupload.Enabled = true; } if (webBrowser1.Url.ToString() == "http://www.adsriver.com/?view=selectcity&targetview=post&cityid=0&lang=en") { GeneralFunction.LinkInvoke(webBrowser1, "USA"); } if (webBrowser1.Url.ToString() == "http://www.adsriver.com/?view=post&postevent=&cityid=1&lang=en&catid=&subcatid=" || webBrowser1.Url.ToString() == "http://www.adsriver.com/index.php?view=post&cityid=1&lang=en") { GeneralFunction.LinkInvoke(webBrowser1, "Automotive"); } if (webBrowser1.Url.ToString() == "http://www.adsriver.com/?view=post&cityid=1&lang=en&catid=1&shortcutregion=") { if (rb_Trucks.Checked || rb_Vans.Checked) { GeneralFunction.LinkInvoke(webBrowser1, "Vans & Trucks "); } else { if (Convert.ToInt32(obUsedCarsInfo[0].YearOfMake.ToString()) > 1991) { GeneralFunction.LinkInvoke(webBrowser1, "Cars"); } else { GeneralFunction.LinkInvoke(webBrowser1, "Other"); } } } if (webBrowser1.Url.ToString() == "http://www.adsriver.com/?view=post&cityid=1&lang=en&catid=1&subcatid=13&shortcutregion=" || webBrowser1.Url.ToString() == "http://www.adsriver.com/?view=post&cityid=1&lang=en&catid=1&subcatid=6&shortcutregion=" || webBrowser1.Url.ToString() == "http://www.adsriver.com/?view=post&cityid=1&lang=en&catid=1&subcatid=16&shortcutregion=") { obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new Adsriver(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; } if (webBrowser1.Url.ToString() != "http://www.adsriver.com/?view=post&cityid=1&lang=en&catid=1&subcatid=13&shortcutregion=" || webBrowser1.Url.ToString() != "http://www.adsriver.com/?view=post&cityid=1&lang=en&catid=1&subcatid=16&shortcutregion=" || webBrowser1.Url.ToString() != "http://www.adsriver.com/?view=post&cityid=1&lang=en&catid=1&subcatid=6&shortcutregion=") { //btnpostsubmit.Enabled = false; foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "Back to Home"; if (element.OuterText == InnerTxt) { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); btnpostsubmit.Visible = false; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } } } #endregion } if (comboBox1.Text == "anunico") { #region anunico string anuurl = string.Empty; // http://www.anunico.us/post_free_ads_buying_selling_cars_real_estate_jobs.html if (webBrowser1.Url.ToString() == "http://www.anunico.us/post_free_ads_in_united_states.html") { btnpostupload.Visible = true; btnpostupload.Enabled = true; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; } if (webBrowser1.Url.ToString() != "http://www.anunico.us/post_free_ads_in_united_states.html") { string url = webBrowser1.Url.ToString(); if (url.Contains("cityid=")) { int index1 = url.IndexOf("cityid="); int end1 = url.IndexOf("lang="); anuurl = url.ToString().Substring(index1, end1 - index1); anuurl = anuurl.Replace("cityid=", ""); anuurl = anuurl.Replace("&", ""); } } string nhh = "http://www.anunico.es/?view=post&cityid=" + anuurl + "&lang=en.us"; if (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us") { GeneralFunction.LinkInvoke(webBrowser1, "Vehicles"); } if (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); int yearnw = Convert.ToInt32(obUsedCarsInfo[0].YearOfMake.ToString()); if (rb_Vans.Checked) { GeneralFunction.LinkInvoke(webBrowser1, "Pickups - Vans"); } else if (rb_Trucks.Checked) { GeneralFunction.LinkInvoke(webBrowser1, "Trucks"); } else { if (yearnw < 1991) { GeneralFunction.LinkInvoke(webBrowser1, "Collectible - Classic Cars"); } else { GeneralFunction.LinkInvoke(webBrowser1, "Cars"); } } } if ((webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=36") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=37") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=42") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=40")) { btnpostsubmit.Visible = false; btnpostsubmit.Enabled = false; circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new anunico(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; if (anupic == 0) { anupic++; } } if ((webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=36&adid=&page=&search=&cityname=&") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=36&adid=0&page=0&search=&cityname=&") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=37&adid=&page=&search=&cityname=&") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=37&adid=0&page=0&search=&cityname=&") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=42&adid=&page=&search=&cityname=&") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=42&adid=0&page=0&search=&cityname=&") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=40&adid=&page=&search=&cityname=&") || (webBrowser1.Url.ToString() == "http://www.anunico.us/?view=post&cityid=" + anuurl + "&lang=en.us&catid=8&subcatid=40&adid=0&page=0&search=&cityname=&")) { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { string InnerTxt = "Back to Home"; if (element.OuterText == InnerTxt) { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); ano++; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } else { } } } if (ano == 1) { } else { if (ano == 0) { MessageBox.Show("Mandatory fields should not leave empty"); GeneralFunction.FileUploadInvoke(webBrowser1, "pic[]"); btnpostsubmit.Enabled = true; ano++; } } } #endregion } if (comboBox1.Text == "classifieds4me") { #region classifieds4me string clsurl = string.Empty; if (webBrowser1.Url.ToString() != "http://www.classifieds4me.com/postad/category.aspx") { if (webBrowser1.Url.ToString() != "http://www.classifieds4me.com/select-city.aspx") { string url = webBrowser1.Url.ToString(); if (url.Contains("city=")) { } else { if (c4mcty == 0) { circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; GeneralFunction.LinkInvoke(webBrowser1, "Select City"); c4mcty++; } } } } if (webBrowser1.Url.ToString() == "http://www.classifieds4me.com/select-city.aspx") { //if (c4cy == 0) //{ // c4cy++; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); GeneralFunction.SetDropDownNameandValue(webBrowser1, "ctl00$ContentPlaceHolder1$cboCountry", "124"); string state = StateName.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State.ToString(), obUsedCarsInfo[0].Carid.ToString()); GeneralFunction.SetDropDownName(webBrowser1, "ctl00$ContentPlaceHolder1$cboState", state); btnpostupload.Visible = true; btnpostupload.Enabled = true; // } } // http://www.classifieds4me.com/rochester-classified-ads-T12961/ //string suburl = webBrowser1.Url.ToString(); //if (suburl.Contains("-classified-ads-")) //{ // if (pfc != 0) // { // string split = suburl.ToString(); // int index1 = split.IndexOf(".com/"); // int end1 = split.IndexOf("-classified"); // string c4mCity = split.ToString().Substring(index1, end1 - index1); // c4mCity = c4mCity.Replace(".com/", ""); // string split1 = suburl.ToString(); // int index2 = split1.IndexOf("ads-"); // int end2 = split.Length; // string c4mCityId = split.ToString().Substring(index2, end2 - index2); // c4mCityId = c4mCityId.Replace("/", ""); // c4mCityId = c4mCityId.Replace("ads-", ""); // if (webBrowser1.Url.ToString() == "http://www.classifieds4me.com/" + c4mCity + "-classified-ads-" + c4mCityId + "/") // { // GeneralFunction.LinkInvoke(webBrowser1, "Post a FREE Classified Ad"); // } // } //} string suburl = webBrowser1.Url.ToString(); if (suburl.Contains("-classified-ads-")) { //{http://www.classifieds4me.com/west-haven-classified-ads-T9336/} // int index1 = url.IndexOf(".com/"); // int end1 = url.IndexOf("classified"); // string clsurl1 = url.ToString().Substring(index1, end1 - index1); // clsurl1 = clsurl1.Replace(".com/", ""); // clsurl1 = clsurl1.Replace("classified", ""); // int index2 = url.IndexOf("ads-"); // int end2 = url.Length;; // string code = url.ToString().Substring(index2, end2 - index2); // code = code.Replace("ads-", ""); // code = code.Replace("/", ""); //if(webBrowser1.Url.ToString()=="http://www.classifieds4me.com/"+clsurl1+"-classified-ads-"+code+"/") //{ //} //btnpostupload.Visible = true; //btnpostupload.Enabled = true; //GeneralFunction.SetDropDownName(webBrowser1, "ctl00$ContentPlaceHolder1$cboCountry", "United States"); //GeneralFunction.SetDropDownNameandValue(webBrowser1, "ctl00$ContentPlaceHolder1$cboState", "525"); } if (webBrowser1.Url.ToString() != "http://www.classifieds4me.com/postad/category.aspx") { string url = webBrowser1.Url.ToString(); if (url.Contains("city=")) { int index1 = url.IndexOf("city="); int end1 = url.IndexOf("&"); clsurl = url.ToString().Substring(index1, end1 - index1); clsurl = clsurl.Replace("city=", ""); clsurl = clsurl.Replace("&", ""); } } if (webBrowser1.Url.ToString() == "http://www.classifieds4me.com/postad/category.aspx") { circularProgressControl2.Start(); circularProgressControl2.Visible = true; panel2.Visible = true; btnpostupload.Enabled = false; GeneralFunction.LinkInvoke(webBrowser1, "Autos"); } if (webBrowser1.Url.ToString() == "http://www.classifieds4me.com/postad/subcategory.aspx?city=" + clsurl + "&CatId=Autos") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); int yr = Convert.ToInt32(obUsedCarsInfo[0].YearOfMake.ToString()); if (yr < 1991 || rb_Trucks.Checked) { GeneralFunction.LinkInvoke(webBrowser1, "Other: Autos For Sale"); } else { GeneralFunction.LinkInvoke(webBrowser1, "Cars & SUVs"); } btnpostupload.Enabled = false; } if ((webBrowser1.Url.ToString() == "http://www.classifieds4me.com/postad/post-ad.aspx?city=" + clsurl + "&cat=Autos&subcat=Cars_SUV") || (webBrowser1.Url.ToString() == "http://www.classifieds4me.com/postad/post-ad.aspx?city=" + clsurl + "&cat=Autos&subcat=Other_Autos")) { circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; if (cls4me == 0) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new classifieds4me(); cls4me++; objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; label28.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label28.ForeColor = System.Drawing.Color.Red; } } string url1 = webBrowser1.Url.ToString(); if (url1.ToString().Contains("post-ad-success")) { btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; label31.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label31.ForeColor = System.Drawing.Color.Red; } else { //GeneralFunction.FileUploadInvoke(webBrowser1, "ctl00$ContentPlaceHolder1$FileUpload1"); //GeneralFunction.FileUploadInvoke(webBrowser1, "ctl00$ContentPlaceHolder1$FileUpload2"); //GeneralFunction.FileUploadInvoke(webBrowser1, "ctl00$ContentPlaceHolder1$FileUpload3"); } // http://www.classifieds4me.com/postad/post-ad-success.aspx?id=967539 #endregion } if (comboBox1.Text == "myadmonster") { #region myadmonster if (webBrowser1.Url.ToString() == "http://www.myadmonster.com/free-ads/postfreead.php") { btnpostupload.Visible = true; btnpostupload.Enabled = true; GeneralFunction.ImgeButtonClickInvoke(webBrowser1, "Click Here To Post A Free Classified Ad"); circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; } if (webBrowser1.Url.ToString() == "http://www.myadmonster.com/free-ads/post_b.php") { if (myads == 0) { GeneralFunction.SetDropDownNameandValue(webBrowser1, "sel_intl_country", "United States"); GeneralFunction.SetDropDownNameandValue(webBrowser1, "sel_cat", "Automotive"); GeneralFunction.SetDropDownNameandValue(webBrowser1, "sel_duration", "28"); GeneralFunction.ButtonClickInvokeValue(webBrowser1, " Continue "); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; btnpostupload.Enabled = false; myads++; } // MessageBox.Show("Please select Continue button"); } if (webBrowser1.Url.ToString() == "http://www.myadmonster.com/free-ads/post_c.php") { if (repeat == 0) { //repeat += 1; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new myadmonster(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; } btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; btnpostupload.Enabled = false; } if (webBrowser1.Url.ToString() != "http://www.myadmonster.com/free-ads/postfreead.php") { if (webBrowser1.Url.ToString() != "http://www.myadmonster.com/free-ads/post_b.php") { if (webBrowser1.Url.ToString() != "http://www.myadmonster.com/free-ads/post_c.php") { //// foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) ////{ // string InnerTxt = "Cars"; ////if (element.OuterHtml == "Click here to view your ad") ////{ label29.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label29.ForeColor = System.Drawing.Color.Red; btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } // } // } } } #endregion } if (comboBox1.Text == "freead1.net") { #region freead1.net if (webBrowser1.Url.ToString() == "http://freead1.net/") { GeneralFunction.LinkInvoke(webBrowser1, "POST FREE AD USA"); } if (webBrowser1.Url.ToString() == "http://freead1.net/post-free-ad-to-USA-42") { circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; if (fread == 0) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new freead1(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); fread++; } } string url = webBrowser1.Url.ToString(); if (url.Contains("add-success")) { btnpostsubmit.Enabled = false; btnuploadtolive.Visible = true; btnuploadtolive.Enabled = true; } #endregion } #region old //if (comboBox1.Text == "classifiedads") //{ // if (webBrowser1.Url.ToString() == "http://www.classifiedads.com/post.php") // { // btnpostupload.Visible = true; // btnpostupload.Enabled = true; // } // else if (webBrowser1.Url.ToString() == "http://www.classifiedads.com/post.php") // { // foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) // { // string InnerTxt = "Cars"; // if (element.OuterText == InnerTxt) // { // //United States // // GeneralFunction.LinkInvoke(webBrowser1, "Vehicles"); // GeneralFunction.LinkInvoke(webBrowser1, "Cars"); // // GeneralFunction.LinkInvoke(webBrowser1, "United States"); // } // } // } // else if (webBrowser1.Url.ToString() == "http://www.classifiedads.com/post.php") // { // foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) // { // string InnerTxt = "United States"; // if (element.OuterText == InnerTxt) // { // //United States // // GeneralFunction.LinkInvoke(webBrowser1, "Vehicles"); // // GeneralFunction.LinkInvoke(webBrowser1, "Cars"); // GeneralFunction.LinkInvoke(webBrowser1, "United States"); // } // } // } //} #endregion if (comboBox1.Text == "99localsearch") { #region 99localsearch if (webBrowser1.Url.ToString() == "http://www.99localsearch.com/freeclassified.aspx") { circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; btnpostupload.Visible = true; btnpostupload.Enabled = true; } #endregion } if (comboBox1.Text == "classifiedads") { #region classifiedads if (webBrowser1.Url.ToString() == "http://www.classifiedads.com/") { GeneralFunction.LinkInvokeClsads(webBrowser1, "Post an Ad (free)", "Post an ad (free)"); } if (webBrowser1.Url.ToString() == "http://www.classifiedads.com/post.php") { if (cads == 0) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; //btnpostupload.Visible = true; //btnpostupload.Enabled = true; //btnpostsubmit.Visible = true; //btnpostsubmit.Enabled = true; IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new ClassifiedAdds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); cads++; } if (cads == 1) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new ClassifiedAdds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); cads++; } if (cads == 2) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new ClassifiedAdds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); cads++; } if (cads == 3) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new ClassifiedAdds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.FileUploadInvoke(webBrowser1, "uploadedfile"); //GeneralFunction.FileUploadInvoke(webBrowser1, "uploadedfile"); //GeneralFunction.FileUploadInvoke(webBrowser1, "uploadedfile"); cads++; btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; } //if (cads == 4) //{ // com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // obUsedCarsInfo = objService.FindCarID(label10.Text); // IWebSites objClass = new ClassifiedAdds(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); // cads++; //} } if (webBrowser1.Url.ToString() != "http://www.classifiedads.com/post.php") { string urltst = webBrowser1.Url.ToString(); if (urltst.Contains(".htm")) { label29.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); label29.ForeColor = System.Drawing.Color.Red; btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; btnpostsubmit.Enabled = false; } } #endregion } if (comboBox1.Text == "facebook") { #region facebook if (webBrowser1.Url.ToString() == "https://www.facebook.com/login.php?next=https://www.facebook.com/messages/") { btnpostupload.Enabled = true; btnpostupload.Visible = true; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new FaceBook(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } // if (webBrowser1.Url.ToString() == "https://www.facebook.com/messages/") //{ // GeneralFunction.LinkInvoke(webBrowser1, "Home"); // } if (webBrowser1.Url.ToString() == "https://www.facebook.com/messages/") { GeneralFunction.LinkInvokeDiv(webBrowser1, "menuPulldown", "Account Settings"); GeneralFunction.LinkInvokeDiv(webBrowser1, "navSubmenuName ellipsis", "UCE - Test"); } if (webBrowser1.Url.ToString() == "https://www.facebook.com/pages/UCE-Test/637729332928509?ref=hl") { // GeneralFunction.ImgeButtonClickFB(webBrowser1); } //if (webBrowser1.Url.ToString() == "https://www.facebook.com/?ref=tn_tnmn") //{ // GeneralFunction.LinkInvokeDiv(webBrowser1, "linkWrap noCount", "United Car Exchange"); //} if (webBrowser1.Url.ToString() == "https://www.facebook.com/pages/United-Car-Exchange/321065371264090") { GeneralFunction.LinkInvokeFB(webBrowser1, "uiIconText _51z7"); } if (webBrowser1.Url.ToString() == "https://www.facebook.com/pages/United-Car-Exchange/321065371264090") { GeneralFunction.LinkInvokeFBInnerDiv(webBrowser1, "Create Photo Album"); } if (webBrowser1.Url.ToString() == "https://www.facebook.com/pages/United-Car-Exchange/321065371264090#!/albums/create.php?id=321065371264090&error=3") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); string title = obUsedCarsInfo[0].YearOfMake.ToString() + " " + obUsedCarsInfo[0].Make.ToString() + " " + obUsedCarsInfo[0].Model.ToString(); GeneralFunction.SetTextvaluebyName(webBrowser1, "name", title); string location = obUsedCarsInfo[0].State.ToString() + " " + obUsedCarsInfo[0].City.ToString() + " " + obUsedCarsInfo[0].Zip.ToString(); GeneralFunction.SetTextvaluebyName(webBrowser1, "location", location); GeneralFunction.ButtonClickBody(webBrowser1, "button"); } if (webBrowser1.Url.ToString() == "https://www.facebook.com/pages/United-Car-Exchange/321065371264090?id=321065371264090&sk=photos_stream") { GeneralFunction.LinkInvokeFB(webBrowser1, "fbPhotosRedesignNavSubtitle"); } //if (webBrowser1.Url.ToString() == "https://www.facebook.com/media/set/edit/a.581830711854220.1073743406.321065371264090/") //{ //https://www.facebook.com/media/upload/photos/simple/?set=a.582546955115929.1073743487.321065371264090 string sburl = webBrowser1.Url.ToString(); if (sburl.Contains("set")) { // foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("input")) //{ string InnerTxt = "Add Date"; // if (element.OuterText == InnerTxt) // { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); //IWebSites objClass = new FaceBook(); //objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); string title = obUsedCarsInfo[0].YearOfMake.ToString() + " " + obUsedCarsInfo[0].Make.ToString() + " " + obUsedCarsInfo[0].Model.ToString(); string dep = obUsedCarsInfo[0].Description.ToString(); GeneralFunction.SetDivValuebyInnerText(webBrowser1, "inputtext _5eln photoAlbumTitleInput DOMControl_placeholder", title); string location = obUsedCarsInfo[0].State.ToString() + " " + obUsedCarsInfo[0].City.ToString() + " " + obUsedCarsInfo[0].Zip.ToString(); GeneralFunction.SetTextvaluebyName(webBrowser1, "location", location); GeneralFunction.SetMultiTextName(webBrowser1, "desc_text", dep); //GeneralFunction.ButtonClickBody(webBrowser1, "button"); // } // } } #endregion } if (comboBox1.Text == "pinterest") { #region pinterest if (webBrowser1.Url.ToString() == "https://www.pinterest.com/") { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("a")) { string InnerTxt = "Log in now"; if (element.OuterText == InnerTxt) { GeneralFunction.LinkInvoke(webBrowser1, "Log in now"); } } } else if (webBrowser1.Url.ToString() == "https://www.pinterest.com/login/") { GeneralFunction.SetTextValue(webBrowser1, "username_or_email", "*****@*****.**"); GeneralFunction.SetTextValue(webBrowser1, "password", "vinayy12345"); GeneralFunction.LinkInvokeFB(webBrowser1, "buttonText");//epage } else if (webBrowser1.Url.ToString() == "http://www.pinterest.com/") { GeneralFunction.LinkInvokeFB(webBrowser1, "profileName");//epage //GeneralFunction.LinkInvoke(webBrowser1, " Your Boards"); GeneralFunction.Linkhref(webBrowser1, "/vinayy5544/boards/"); // GeneralFunction.LinkInvokeCollectorCarsPic(webBrowser1); webBrowser1.Navigate("http://www.pinterest.com/vinayy5544/boards/"); } //// ////MODIFIED //// else if (webBrowser1.Url.ToString() == "http://www.pinterest.com/vinayy5544/boards/" || webBrowser1.Url.ToString() == "http://www.pinterest.com/vinayy5544/boards/#") { if (pnt == 0) { // GeneralFunction.LinkInvoke(webBrowser1, "Create a board"); // GeneralFunction.LinkInvokeCollectorCarsPic(webBrowser1); GeneralFunction.LinkInvokepintrest(webBrowser1, "BoardCreateRep Module"); btnpostupload.Visible = true; btnpostupload.Enabled = true; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; pnt++; } } // com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // obUsedCarsInfo = objService.FindCarID(label10.Text); // IWebSites objClass = new Pintrest(); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); // circularProgressControl2.Stop(); // circularProgressControl2.Visible = false; // panel2.Visible = false; // } //} #endregion } if (comboBox1.Text == "hot9ads") { #region hot9ads if (webBrowser1.Url.ToString() == "http://www.hot9ads.com/") { this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); GeneralFunction.LinkInvoke(webBrowser1, "Register for a free account"); } if (webBrowser1.Url.ToString() == "http://www.hot9ads.com/user/register") { //webBrowser1.Navigate("http://www.hot9ads.com/"); GeneralFunction.SetTextValue(webBrowser1, "s_email", comboBox2.Text); com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new Hot9Ads(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); ht9++; } if (webBrowser1.Url.ToString() == "http://www.hot9ads.com/") { if (ht9 == 1) { GeneralFunction.LinkInvoke(webBrowser1, "Publish your ad for free"); } } if (webBrowser1.Url.ToString() == "http://www.hot9ads.com/item/new") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new Hot9Ads(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; } if (webBrowser1.Url.ToString() == "http://www.hot9ads.com/index.php") { // GeneralFunction.LinkInvoke(webBrowser1, "Login"); MessageBox.Show("You have already registerd with this emailid.Change the emailid and post again"); } //if (webBrowser1.Url.ToString() == "http://www.hot9ads.com/user/login") //{ // GeneralFunction.SetTextValue(webBrowser1, "s_email", comboBox2.Text); // GeneralFunction.SetTextValue(webBrowser1, "s_password", "UCEURV123"); // GeneralFunction.ButtonClickBody(webBrowser1, "submit"); //} #endregion } if (comboBox1.Text == "75vn") { #region 75vn if (webBrowser1.Url.ToString() == "http://www.75vn.com/") { GeneralFunction.LinkInvoke(webBrowser1, "Login"); } if (webBrowser1.Url.ToString() == "http://www.75vn.com/member/login.php") { GeneralFunction.LinkInvoke(webBrowser1, "Create seller account (Free)"); } if (webBrowser1.Url.ToString() == "http://www.75vn.com/member/create.php") { Globaltxtemail.txtemail = comboBox2.Text; Globalpwd.pwd = textBox2.Text; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new Vn75(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } if (webBrowser1.Url.ToString() == "http://www.75vn.com/mod.php") { this.Opacity = 100; circularProgressControl2.Start(); circularProgressControl2.Visible = true; panel2.Visible = true; this.Refresh(); GeneralFunction.LinkInvoke(webBrowser1, "Place an ad"); } if (webBrowser1.Url.ToString() == "http://www.75vn.com/post.php") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); int year = Convert.ToInt32(obUsedCarsInfo[0].YearOfMake.ToString()); if (rb_Trucks.Checked) { GeneralFunction.LinkInvoke(webBrowser1, "SELL YOUR COMMERCIAL TRUCK - Click Here"); } else { if (year < 1990) { GeneralFunction.LinkInvoke(webBrowser1, "SELL YOUR CLASSIC CAR - Click Here"); } else { GeneralFunction.LinkInvoke(webBrowser1, "SELL YOUR CAR - Click Here"); } } } if ((webBrowser1.Url.ToString() == "http://www.75vn.com/auto/place_ad.php?TypeItem=35") || (webBrowser1.Url.ToString() == "http://www.75vn.com/car/place_ad.php?TypeItem=32") || (webBrowser1.Url.ToString() == "http://www.75vn.com/truck/place_ad.php?TypeItem=31")) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new Vn75(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.ButtonClickInvoke(webBrowser1, "btn_Add"); } if (webBrowser1.Url.ToString().Contains("&IDProduct=")) { GeneralFunction.LinkInvoke(webBrowser1, "UPLOAD PHOTOS"); this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); } if (webBrowser1.Url.ToString().Contains("http://www.75vn.com/auto/") || webBrowser1.Url.ToString().Contains("http://www.75vn.com/truck/") || webBrowser1.Url.ToString().Contains("http://www.75vn.com/car/")) { if (webBrowser1.Url.ToString().Contains("IDProduct=")) { btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; //Log Out http://www.75vn.com/car/display_ad.php?TypeItem=32&IDProduct=40649 } } #endregion } if (comboBox1.Text == "adpost us") { #region adpost us if (webBrowser1.Url.ToString() == "http://www.adpost.com/") { GeneralFunction.LinkInvoke(webBrowser1, "United States"); } if (webBrowser1.Url.ToString() == "http://www.adpost.com/us/") { GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); } if (webBrowser1.Url.ToString() == "http://www.adpost.com/us/?website=&language=&session_key=&place_front_page=on") { GeneralFunction.LinkInvoke(webBrowser1, "Vehicles"); } if (webBrowser1.Url.ToString() == "http://www.adpost.com/us/?db=us_vehicles&website=&language=&session_key=&add_item_button=on") { //GeneralFunction.LinkInvoke(webBrowser1, "Click here to Register now!"); GeneralFunction.SetTextValue(webBrowser1, "auth_user_name", "IL54545"); GeneralFunction.SetTextValue(webBrowser1, "auth_password1", Globalpwd.pwd); } if ((webBrowser1.Url.ToString() == "http://www.adpost.com/us/?&db=us_vehicles&session_key=&add_item_button=on&language=&website=&auth_register_screen_op=on&") || (webBrowser1.Url.ToString() == "http://www.adpost.com/us/?&add_item_button=on&website=&db=us_vehicles&session_key=&language=&auth_register_screen_op=on&")) { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new adpost_us(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); this.Opacity = 100; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; this.Refresh(); btnpostupload.Enabled = true; btnpostupload.Visible = true; if (adp == 0) { adp++; } } if (webBrowser1.Url.ToString() == "http://www.adpost.com/us/") { //if (adp == 1) //{ com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new adpost_us(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); //} } #endregion } if (comboBox1.Text == "webcosmo") { #region webcosmo GeneralFunction.SetDropDownNameandValue(webBrowser1, "ctl00$cphContent$ddlCountry", "1"); GeneralFunction.SetDropDownNameandValue(webBrowser1, "ctl00$cphContent$ddlGenre", "4"); com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new WebCosmo(); if (webBrowser1.Url.ToString().Contains("PostListing.aspx") && webBrowser1.Url.ToString().Contains("countryId=1&stateId=")) { if (a) { objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); a = false; //GeneralFunction.ButtonClickInvoke(webBrowser1, "ctl00$cphContent$btnSubmit"); } else if (webBrowser1.DocumentText.ToString().Contains("Duplicate posting")) { MessageBox.Show("Carid once posted in this site is not allowed to post again within 24 Hours"); } } else if (webBrowser1.Url.ToString().Contains("PostReview.aspx") && webBrowser1.Url.ToString().Contains("countryId=1&stateId=") || webBrowser1.Url.ToString().Contains("countryid=1&stateid=")) { btnpostupload.Visible = false; btnpostupload.Enabled = false; btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } circularProgressControl2.Stop(); btnpostupload.Visible = true; btnpostupload.Enabled = true; #endregion } if (comboBox1.Text == "tumblr") { #region tumblr if (webBrowser1.Url.ToString() == "https://www.tumblr.com/login?redirect_to=%2Fnew%2Ftext") { GeneralFunction.ButtonClickInvoke(webBrowser1, "user[email]"); GeneralFunction.ButtonClickInvoke(webBrowser1, "user[password]"); } else if (webBrowser1.Url.ToString() == "http://www.tumblr.com/dashboard") { GeneralFunction.LinkhrefForTumbler(webBrowser1, "new_post_label_text"); } else if (webBrowser1.Url.ToString() == "http://www.tumblr.com/new/text?redirect_to=/dashboard" || webBrowser1.Url.ToString() == "http://www.tumblr.com/new/text") { //Add car Details Title,Description GeneralFunction.SetTextValue(webBrowser1, "post[one]", "Hello"); GeneralFunction.SetMultiTextValue(webBrowser1, "post[two]", "Hello Description"); //Should Add Images Manually GeneralFunction.ButtonClick(webBrowser1, "submit"); } #endregion } if (comboBox1.Text == "cargurus") { #region cargurus com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new WebCosmo(); string username = comboBox2.Text; ; Char[] seprt = { '@' }; string[] splitemail = username.Split(seprt); username = splitemail[0].ToString(); if (this.webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://www.cargurus.com/") { ucount++; GeneralFunction.spanLinkInvoke(webBrowser1, "Register"); } if (webBrowser1.Url.ToString() == "http://www.cargurus.com/") { if (ucount > 1) { foreach (HtmlElement element in webBrowser1.Document.GetElementsByTagName("span")) { if (element.InnerText.Trim() == "Sell Your Car") { GeneralFunction.spanLinkInvoke1(webBrowser1, "Sell Your Car"); ucount--; return; } } } } if (webBrowser1.Url.ToString() == "https://www.cargurus.com/Cars/authentication/renderRegistrationForm.action?redirectUrl=/Cars/index.html&cgLocale=en") { GeneralFunction.SetTextValue(webBrowser1, "person.screenName", username); GeneralFunction.SetTextValue(webBrowser1, "person.password", textBox2.Text); GeneralFunction.SetTextValue(webBrowser1, "person.email", comboBox2.Text); GeneralFunction.ButtonClickInvokeInnerText1(webBrowser1, "Register"); } if (webBrowser1.Url.ToString() == "http://www.cargurus.com/Cars/sell-car/") { GeneralFunction.SetTextValue(webBrowser1, "zip", obUsedCarsInfo[0].Zip.ToString()); GeneralFunction.ButtonClickInvokeInnerText1(webBrowser1, "Get Started"); } if (webBrowser1.Url.ToString() == "http://www.cargurus.com/Cars/sell-car/createAd.action?zip=" + obUsedCarsInfo[0].Zip.ToString()) { SelectOption(webBrowser1, obUsedCarsInfo[0].Make.ToString(), "ign-makerId-selectedEntity"); SelectOption(webBrowser1, obUsedCarsInfo[0].Model.ToString(), "ign-modelId-selectedEntity"); //SelectOption(webBrowser1, obUsedCarsInfo[0].YearOfMake.ToString(), "ign-carId-selectedEntity"); //SelectOption(webBrowser1, obUsedCarsInfo[0].Transmission.ToString(), "selectedTransmission"); //GeneralFunction.SetTextValue(webBrowser1, "exteriorColor", obUsedCarsInfo[0].ExteriorColor.ToString()); //GeneralFunction.SetTextValue(webBrowser1, "interiorColor", obUsedCarsInfo[0].InteriorColor.ToString()); //GeneralFunction.SetTextValue(webBrowser1, "vin", obUsedCarsInfo[0].VIN.ToString()); IWebSites ob = new cargurus(); ob.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } if (webBrowser1.Url.ToString().Contains("addPhotos.action") && webBrowser1.ReadyState == WebBrowserReadyState.Complete) { ucount1++; } if (webBrowser1.Url.ToString().Contains("addPhotos.action") && webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (ucount1 == 1) { //for (int i = 0; i < 3; i++) //{ GeneralFunction.FileUploadInvoke(webBrowser1, "file"); GeneralFunction.FileUploadInvoke(webBrowser1, "file"); //GeneralFunction.FileUploadInvoke(webBrowser1, "file"); //} ucount1++; //GeneralFunction.ButtonClickByValue(webBrowser1, "Finish"); btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } } if (webBrowser1.Url.ToString().Contains("viewGarage.action")) { btnpostsubmit.Visible = false; btnpostsubmit.Enabled = false; btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; //GeneralFunction.LinkInvoke(webBrowser1, "Sign out"); //circularProgressControl2.Stop(); //btnpostupload.Visible = true; //btnpostupload.Enabled = true; } } #endregion } if (comboBox1.Text == "soavo") { #region soavo if (webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://www.soavo.com/user/register") { string username = comboBox2.Text; string mail = comboBox2.Text; Char[] seprt = { '@' }; string[] splitemail = username.Split(seprt); username = splitemail[0].ToString(); GeneralFunction.SetTextValue(webBrowser1, "s_name", username); GeneralFunction.SetTextValue(webBrowser1, "s_password", "UCEURV123"); GeneralFunction.SetTextValue(webBrowser1, "s_password2", "UCEURV123"); GeneralFunction.SetTextValue(webBrowser1, "s_email", mail); Txt_Url.Visible = true; Navigate_btn.Visible = true; } if (webBrowser1.Url.ToString() == "http://www.soavo.com/") { Txt_Url.Visible = false; Navigate_btn.Visible = false; GeneralFunction.LinkInvoke(webBrowser1, "Publish your ad for free"); } if (webBrowser1.Url.ToString() == "http://www.soavo.com/item/new") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new soavo(); GeneralFunction.SetDropDownNameandValue(webBrowser1, "select_1", "100"); if (rb_Trucks.Checked || rb_Vans.Checked) { GeneralFunction.SetDropDownNameandValue(webBrowser1, "select_2", "143"); } else if (Convert.ToInt32(obUsedCarsInfo[0].YearOfMake.ToString())<1991) { GeneralFunction.SetDropDownNameandValue(webBrowser1, "select_2", "144"); } else { GeneralFunction.SetDropDownNameandValue(webBrowser1, "select_2", "140"); } objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); string statename = StateName.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State.ToString(), obUsedCarsInfo[0].Carid.ToString()); SelectOption(webBrowser1, statename, "regionId"); string city = obUsedCarsInfo[0].City.ToString(); SelectOption(webBrowser1, city, "cityId"); string cityarea = city + "," + obUsedCarsInfo[0].State.ToString() + obUsedCarsInfo[0].Zip.ToString(); GeneralFunction.SetTextValue(webBrowser1, "cityArea", cityarea); GeneralFunction.SetTextValue(webBrowser1, "address", cityarea); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; } if (webBrowser1.Url.ToString() == "http://www.soavo.com/vehicles/cars") { btnpostsubmit.Visible = false; btnpostsubmit.Enabled = false; btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; GeneralFunction.LinkInvoke(webBrowser1, "Logout"); } } #endregion } if (comboBox1.Text == "web-free-ads" || comboBox1.Text == "webfreeads") { #region webfreeads if (webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://web-free-ads.com/index.php?view=post&cityid=1&lang=en") { GeneralFunction.LinkInvoke(webBrowser1, "Change"); } if (webBrowser1.Url.ToString() == "http://web-free-ads.com/?view=selectcity&targetview=post") { //string url = ""; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); string state = StateName.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State, "1"); GeneralFunction.LinkInvoke(webBrowser1, state); foreach (HtmlElement el in webBrowser1.Document.GetElementsByTagName("a")) { if (el.InnerText == state) { url = el.GetAttribute("href").ToString(); url = url.Substring(url.IndexOf("cityid")); url = url.Replace("cityid=", ""); url = url.Substring(0, url.IndexOf("&")); } } } if (webBrowser1.Url.ToString() == "http://web-free-ads.com/?view=post&postevent=&cityid="+url+"&lang=en&catid=&subcatid=") { GeneralFunction.LinkInvoke(webBrowser1, "Automotive"); } if (webBrowser1.Url.ToString() == "http://web-free-ads.com/?view=post&cityid=" + url + "&lang=en&catid=8&shortcutregion=") { if(rb_Trucks.Checked || rb_Vans.Checked) GeneralFunction.LinkInvoke(webBrowser1, "Vans & Commercial"); else GeneralFunction.LinkInvoke(webBrowser1, "Cars"); } if (webBrowser1.Url.ToString() == "http://web-free-ads.com/?view=post&cityid=" + url + "&lang=en&catid=8&subcatid=3&shortcutregion=" || webBrowser1.Url.ToString() == "http://web-free-ads.com/?view=post&cityid=" + url + "&lang=en&catid=8&subcatid=9&shortcutregion=") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites obwebfreeads = new webfreeads(); obwebfreeads.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.SetTextValue(webBrowser1, "email", comboBox2.Text); GeneralFunction.FileUploadInvoke(webBrowser1, "pic[]"); GeneralFunction.CheckedInvoke(webBrowser1, "agree"); //GeneralFunction.RadioSetValue(webBrowser1, "agree", "1"); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; } if (webBrowser1.Url.ToString() == "http://web-free-ads.com/index.php?view=post&cityid=" + url + "&lang=en&catid=8&subcatid=3&shortcutregion=&" || webBrowser1.Url.ToString() == "http://web-free-ads.com/index.php?view=post&cityid=" + url + "&lang=en&catid=8&subcatid=9&shortcutregion=&") { btnpostsubmit.Visible = false; btnpostsubmit.Enabled = false; btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; } } #endregion } if (comboBox1.Text == "blackworld") { #region blackworld if (webBrowser1.Url.ToString() == "http://classifieds.blackworld.com/") { GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); } if (webBrowser1.Url.ToString() == "http://classifieds.blackworld.com/index.php?view=post&cityid=1&lang=en") { GeneralFunction.LinkInvoke(webBrowser1, "Auto Sales & Car Accessories"); } if (webBrowser1.Url.ToString() == "http://classifieds.blackworld.com/?view=post&cityid=1&lang=en&catid=4") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); if (rb_Trucks.Checked) { GeneralFunction.LinkInvoke(webBrowser1, "Trucks & Heavy Vehicles"); } else if (obUsedCarsInfo[0].Price < 2000) { GeneralFunction.LinkInvoke(webBrowser1, "Autos under $2000"); } else if (obUsedCarsInfo[0].Price > 2000 && obUsedCarsInfo[0].Price < 10000) { GeneralFunction.LinkInvoke(webBrowser1, "Autos $2000 to $10000"); } else if (obUsedCarsInfo[0].Price > 10000) { GeneralFunction.LinkInvoke(webBrowser1, "Autos $10000 upwards"); } } if (webBrowser1.Url.ToString() == "http://classifieds.blackworld.com/?view=post&cityid=1&lang=en&catid=4&subcatid=29" || webBrowser1.Url.ToString() == "http://classifieds.blackworld.com/?view=post&cityid=1&lang=en&catid=4&subcatid=28" || webBrowser1.Url.ToString() == "http://classifieds.blackworld.com/?view=post&cityid=1&lang=en&catid=4&subcatid=30" || webBrowser1.Url.ToString() == "http://classifieds.blackworld.com/?view=post&cityid=1&lang=en&catid=4&subcatid=31") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites obblackworld = new classifieds_blackworld(); obblackworld.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.SetTextValue(webBrowser1, "email", comboBox2.Text); GeneralFunction.FileUploadInvoke(webBrowser1, "pic[]"); GeneralFunction.RadioSetValue(webBrowser1, "agree", "1"); } #endregion } if (comboBox1.Text == "extraclassifieds") { #region extraclassifieds if (webBrowser1.ReadyState == WebBrowserReadyState.Complete) { if (webBrowser1.Url.ToString() == "http://extraclassifieds.com/") { eccount++; if (eccount < 3) { GeneralFunction.LinkInvoke(webBrowser1, "Register a free account"); if (webBrowser1.DocumentText.Contains("<div id=\"flashmessage\" class=\"flashmessage flashmessage-ok\">")) { Txt_Url.Visible = true; Navigate_btn.Visible = true; } } if (eccount >= 3) { GeneralFunction.LinkInvoke(webBrowser1, "Publish your ad for free"); } } if (webBrowser1.Url.ToString() == "http://extraclassifieds.com/user/register") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); string username = comboBox2.Text; string mail = comboBox2.Text; Char[] seprt = { '@' }; string[] splitemail = username.Split(seprt); username = splitemail[0].ToString(); GeneralFunction.SetTextValue(webBrowser1, "s_name", username); GeneralFunction.SetTextValue(webBrowser1, "s_password", "UCEURV123"); GeneralFunction.SetTextValue(webBrowser1, "s_password2", "UCEURV123"); GeneralFunction.SetTextValue(webBrowser1, "s_email", comboBox2.Text); GeneralFunction.SetTextValue(webBrowser1, "s_phone_mobile", obUsedCarsInfo[0].Phone); } //Register a free account #region old if (webBrowser1.Url.ToString() == "http://extraclassifieds.com/item/new") { //GeneralFunction.SetDropDownValue(webBrowser1, "catId", " Cars"); if (rb_Trucks.Checked || rb_Vans.Checked) { SelectOption(webBrowser1, " Vans, Trucks, Commercial Vehicles", "catId"); } else { SelectOption(webBrowser1, " Cars", "catId"); } com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites obextraclassifieds = new extraclassifieds(); obextraclassifieds.carpostfunc(webBrowser1, obUsedCarsInfo, true); GeneralFunction.SetTextValue(webBrowser1, "contactEmail", comboBox2.Text); GeneralFunction.SetTextValue(webBrowser1, "contactName", "UCEURVE"); SelectOption(webBrowser1, "United States", "countryId"); GeneralFunction.SetTextValue(webBrowser1, "city", obUsedCarsInfo[0].City); GeneralFunction.SetTextValue(webBrowser1, "cityArea", obUsedCarsInfo[0].Phone); SelectOption(webBrowser1, "Used", "meta[1]"); //GeneralFunction.FileUploadInvoke(webBrowser1, "photos[]"); //GeneralFunction.FileUploadInvoke(webBrowser1, "photos[]"); btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } if (webBrowser1.Url.ToString() == "http://extraclassifieds.com/cars-vehicles/cars") { btnpostsubmit.Enabled = false; btnpostsubmit.Visible = false; btnuploadtolive.Enabled = true; btnuploadtolive.Visible = true; } #endregion } #endregion } if (comboBox1.Text == "meetpark") { #region meetpark string newurl = webBrowser1.Url.ToString(); if (newurl.Contains("cityid")) { newurl = newurl.Substring(newurl.IndexOf("cityid")); newurl = newurl.Substring(newurl.IndexOf("="), newurl.IndexOf("&") - newurl.IndexOf("=")); newurl = newurl.Replace("=", "").Trim(); } else if (newurl.Contains(sname)) { newurl = Regex.Replace(newurl, @"[^0-9]", ""); } #region new if (webBrowser1.Url.ToString() == "http://www.meetpark.com/") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); sname = StateName.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State.ToString(), label10.Text); GeneralFunction.LinkInvoke(webBrowser1, sname); } if (webBrowser1.Url.ToString() == "http://www.meetpark.com/" + newurl + "-" + sname + "/") { GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); } else if (webBrowser1.Url.ToString() == "http://www.meetpark.com/index.php?view=post&cityid=" + newurl + "&lang=en") { //GeneralFunction.LinkInvoke(webBrowser1, "Change"); GeneralFunction.LinkInvoke(webBrowser1, "For Sale"); } else if (webBrowser1.Url.ToString() == "http://www.meetpark.com/?view=post&cityid=" + newurl + "&lang=en&catid=4&shortcutregion=") { GeneralFunction.LinkInvoke(webBrowser1, "cars+trucks"); } //else if (webBrowser1.Url.ToString() == "http://www.meetpark.com/?view=selectcity&targetview=post&cityid=0&lang=en" // || webBrowser1.Url.ToString() == "http://www.meetpark.com/?view=selectcity&targetview=post") //{ // com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); // IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); // obUsedCarsInfo = objService.FindCarID(label10.Text); // sname = StateName.GetStateName(obUsedCarsInfo, obUsedCarsInfo[0].State.ToString(), label10.Text); // GeneralFunction.LinkInvoke(webBrowser1, sname); //} //else if (webBrowser1.Url.ToString() == "http://www.meetpark.com/?view=post&postevent=&cityid=" + newurl + "&lang=en&catid=&subcatid=") //{ // GeneralFunction.LinkInvoke(webBrowser1, "For Sale"); //} else if (webBrowser1.Url.ToString() == "http://www.meetpark.com/?view=post&cityid=" + newurl + "&lang=en&catid=4&subcatid=56&shortcutregion=") { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites obmeetpark = new meetpark(); obmeetpark.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.SetTextValue(webBrowser1, "email", comboBox2.Text);//obUsedCarsInfo[0].Email; GeneralFunction.CheckedInvoke(webBrowser1, "agree"); } #endregion btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; #endregion } if (comboBox1.Text == "webleeg") { #region webleeg if (webBrowser1.Url.ToString() == "http://www.webleeg.com/register.php") { string username = comboBox2.Text; string mail = comboBox2.Text; Char[] seprt = { '@' }; string[] splitemail = username.Split(seprt); username = splitemail[0].ToString(); GeneralFunction.SetTextValue(webBrowser1, "c[email]", mail); GeneralFunction.SetTextValue(webBrowser1, "c[email_verifier]", mail); GeneralFunction.SetTextValue(webBrowser1, "c[username]", username); GeneralFunction.SetTextValue(webBrowser1, "c[password]", "UCEURV123"); GeneralFunction.SetTextValue(webBrowser1, "c[password_confirm]", "UCEURV123"); GeneralFunction.RadioSetValue(webBrowser1, "c[agreement]", "yes"); GeneralFunction.ButtonClickInvoke(webBrowser1, "submit"); } if (webBrowser1.Url.ToString() == "http://www.webleeg.com/register.php?b=1") { GeneralFunction.LinkInvoke(webBrowser1, "CLICK HERE"); } if (webBrowser1.Url.ToString() == "http://www.webleeg.com/") { GeneralFunction.LinkInvoke(webBrowser1, "Post Ad"); } if (webBrowser1.Url.ToString() == "http://www.webleeg.com/index.php?a=4") { GeneralFunction.LinkInvoke(webBrowser1, "New Classified"); } if (webBrowser1.Url.ToString() == "http://www.webleeg.com/index.php?a=cart&action=new&main_type=classified") { GeneralFunction.RadioSetValue(webBrowser1, "b[leveled][cat][1]", "304"); GeneralFunction.SetDropDownNameandValue(webBrowser1, "select", "360"); com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites obwebleeg = new webleeg(); obwebleeg.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } #endregion } // btnpostupload.Visible = false; // btnpostupload.Enabled = false; // btnpostsubmit.Enabled = true; // btnpostsubmit.Visible = true; //} } Cursor.Current = Cursors.Default; }
private void dataGridView4_CellClick(object sender, DataGridViewCellEventArgs e) { string data2 = string.Empty; if (e.RowIndex != -1) { purl = dataGridView4.SelectedCells[0].RowIndex; string data0 = dataGridView4.Rows[purl].Cells[0].Value.ToString(); string data1 = dataGridView4.Rows[purl].Cells[1].Value.ToString(); if (data1 != "") { Regex obj = new Regex("^([1-9]|0[1-9]|1[0-9]|2[0-9]|3[0-1])[- / .]([1-9]|0[1-9]|1[0-2])[- / .]([1-9]|0[1-9]|1[0-9])$"); if (obj.IsMatch(data1.ToString())) { } else { data2 = dataGridView4.Rows[purl].Cells[2].Value.ToString(); if ((data2 == "UrlPend") || (data2 == "QcPend")) { string data5 = dataGridView4.Rows[purl].Cells[4].Value.ToString(); string data4 = dataGridView4.Rows[purl].Cells[3].Value.ToString(); if (e.ColumnIndex == 2) { if (data2 == "UrlPend") { Cursor.Current = Cursors.WaitCursor; GlobalNoteCarId.notecarid = data5; GlobalSite.Site = data1; GlobalUrlid.Urlid = Convert.ToInt32(data0); SubPopUrl objsuburl = new SubPopUrl(); // objsuburl.MdiParent = this; objsuburl.ShowDialog(); // objsuburl.BringToFront(); Cursor.Current = Cursors.Default; } } if (e.ColumnIndex == 2) { Cursor.Current = Cursors.WaitCursor; data2 = dataGridView4.Rows[purl].Cells[2].Value.ToString(); if (data2 == "QcPend") { ////button6.Enabled = true; ////button4.Enabled = true; button6.Visible = false; button4.Visible = false; ; data5 = dataGridView4.Rows[purl].Cells[4].Value.ToString(); string data6 = dataGridView4.Rows[purl].Cells[5].Value.ToString(); string data7 = dataGridView4.Rows[purl].Cells[7].Value.ToString(); string data8 = dataGridView4.Rows[purl].Cells[8].Value.ToString(); GlobalpendURL.pendURL = data6; GlobalUrlsid.Urlsid = Convert.ToInt32(data0); GlobalNoteCarId.notecarid = data5; Globalpenddate.penddate = data8; lblpostsite.Visible = false; comboBox1.Visible = false; //Main objfrm = new Main(); //objfrm.Show(); //------------------------------------------start------------------------------------- try { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(data5); // FillCarDetails(obUsedCarsInfo); QCCarDetails(obUsedCarsInfo); DataSet dsSubDet = new DataSet(); int cid = Convert.ToInt32(GlobalNoteCarId.notecarid); dsSubDet = objSubmitionDetailsBL.GetSubmitionDetailsByCarId(cid); dgvpostforpostedcarid.DataSource = dsSubDet.Tables[0]; DataGridViewColumn clmpostmn0 = dgvpostforpostedcarid.Columns[0]; clmpostmn0.Width = 80; DataGridViewColumn clmpostmn1 = dgvpostforpostedcarid.Columns[1]; clmpostmn1.Width = 80; DataGridViewColumn clmpostmn2 = dgvpostforpostedcarid.Columns[2]; clmpostmn2.Width = 75; tabControl1.SelectedIndex = 4; if (tabControl1.SelectedIndex == 4) { circularProgressControl2.Start(); panel2.Visible = true; circularProgressControl2.Visible = true; webBrowser1.Navigate(data6); webBrowser1.Visible = true; pnlpoststeps.Visible = false; label34.Visible = false; label35.Visible = false; label36.Visible = false; label37.Visible = false; comboBox1.Text = ""; label40.Visible = true; label41.Visible = true; // dgvpostforpostedcarid.Visible = false; comboBox2.Visible = false; button5.Visible = false; button7.Visible = false; textBox2.Visible = false; lblemail.Visible = false; label25.Visible = false; btnpostupload.Visible = false; btnpostsubmit.Visible = false; btnuploadtolive.Visible = false; circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; //button4.Visible = true; //button6.Visible = true; //button4.Enabled = true; //button6.Enabled = true; } } catch (Exception ex) { } //--------------end----------------- GlobalsiteId.siteId = Convert.ToInt32(data7); Cursor.Current = Cursors.Default; //QCFormcheck objqcformchech = new QCFormcheck(); //objqcformchech.Show(); } } } } } } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { string pstcrid = string.Empty; // this.Opacity = .5; int Pmin = 0; int Pmax = 150; // progressBar1.Value = 0; label39.Text = ""; //progressBar1.Visible = false; button4.Visible = false; button6.Visible = false; btnGetAllPics.Enabled = true; // string hex ="ffffffff"; // long l = Convert.ToInt64(hex, 16); // And back to hex... // string hex2 = l.ToString("X"); if ((e.ColumnIndex == 0) || (e.ColumnIndex == 2)) { if (e.ColumnIndex == 0) { if (e.RowIndex != -1) { label47.Visible = false; // tabControl1.SelectedIndex = 4; Cursor.Current = Cursors.WaitCursor; comboBox1.Text = ""; btnuploadtolive.Visible = false; btnpostsubmit.Visible = false; btnpostupload.Visible = false; comboBox2.Visible = false; button5.Visible = false; button7.Visible = false; textBox2.Visible = false; lblemail.Visible = false; label25.Visible = false; btnforward.Visible = false; btnback.Visible = false; lblimages.Visible = false; textBox4.Text = ""; //btnGetAllPics.Visible = true; dgvpostforpostedcarid.Visible = true; label38.Visible = true; label39.Visible = true; label41.Visible = true; label40.Visible = true; //postingtab int i = 0; i = dataGridView1.SelectedCells[0].RowIndex; carid = dataGridView1.Rows[i].Cells[0].Value.ToString(); date = dataGridView1.Rows[i].Cells[1].Value.ToString(); Tickets = dataGridView1.Rows[i].Cells[8].Value.ToString(); Status = dataGridView1.Rows[i].Cells[6].Value.ToString(); //---------posttabdetails start----------------- try { com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(carid); FillCarDetails(obUsedCarsInfo); tabControl1.SelectedIndex = 4; comboBox1.Text = ""; if (tabControl1.SelectedIndex == 4) { circularProgressControl2.Visible = false; webBrowser1.Visible = false; pnlpoststeps.Visible = false; } } catch (Exception ex) { } //---------posttabcardetails end-------------------- //----------For getting posted information basedon carid start-------------------------------- DataSet dsSubDet = new DataSet(); int carid1 = Convert.ToInt32(carid); dsSubDet = objSubmitionDetailsBL.GetSubmitionDetailsByCarId(carid1); if (dsSubDet.Tables[0].Rows.Count == 0) { dgvpostforpostedcarid.DataSource = dsSubDet.Tables[0]; // dgvpostforpostedcarid.Visible = false; label48.Text = "Zero Posts For this Carid"; label48.Visible = true; } else { label48.Visible = false; dgvpostforpostedcarid.DataSource = dsSubDet.Tables[0]; this.dgvpostforpostedcarid.AdvancedCellBorderStyle.Right = DataGridViewAdvancedCellBorderStyle.None; panel1.Visible = false; DataGridViewColumn clmpostgrd0 = dgvpostforpostedcarid.Columns[0]; clmpostgrd0.Width = 80; DataGridViewColumn clmpostgrd1 = dgvpostforpostedcarid.Columns[1]; clmpostgrd1.Width = 80; DataGridViewColumn clmpostgrd2 = dgvpostforpostedcarid.Columns[2]; clmpostgrd2.Width = 75; } DataSet dsemail1 = new DataSet(); dsemail1 = objSubmitionDetailsBL.MultiGetEmailByCarid(label10.Text); if (dsemail1.Tables.Count > 0) { if (dsemail1.Tables[0].Rows.Count > 0) { comboBox2.DataSource = dsemail1.Tables[0]; comboBox2.DisplayMember = dsemail1.Tables[0].Columns["EmailId"].ToString(); textBox2.Text = dsemail1.Tables[0].Rows[0]["Password"].ToString(); } } // dgvpostforpostedcarid.CellBorderStyle = DataGridViewCellBorderStyle.None; DataSet dsnote = new DataSet(); dsnote = objSubmitionDetailsBL.GetMultiNote(carid1); if (dsnote.Tables.Count > 0) { if (dsnote.Tables[0].Rows.Count > 0) { textBox4.Text = dsnote.Tables[0].Rows[0]["Note"].ToString(); } } label34.Text = date; // label37.Text = Tickets; //if (Status == "Paid") //{ // label39.Text = "Published"; //} //else //{ // label39.Text = "NotPublished"; //} label39.ForeColor = Color.Green; label38.ForeColor = Color.Green; circularProgressControl2.Stop(); panel2.Visible = false; circularProgressControl2.Visible = false; Cursor.Current = Cursors.Default; //----------For getting posted information basedon carid end------------------------------------------- } } //----------for geting postedsitelist start-------------- if (e.ColumnIndex == 2) { Cursor.Current = Cursors.WaitCursor; label16.Visible = true; label17.Visible = true; label18.Visible = true; label22.Visible = true; int i = dataGridView1.SelectedCells[0].RowIndex; carid = dataGridView1.Rows[i].Cells[0].Value.ToString(); DataSet dts1 = new DataSet(); dts1 = objSubmitionDetailsBL.MultigetpostedSites(carid); dgvviewpostedsite.DataSource = dts1.Tables[0]; DataGridViewColumn column0 = dgvviewpostedsite.Columns[0]; column0.Width = 150; DataGridViewColumn column1 = dgvviewpostedsite.Columns[1]; column1.Width = 150; DataSet dts2 = new DataSet(); dts2 = objSubmitionDetailsBL.MultigetViewpendingsite(carid); dgvviewpendingsites.DataSource = dts2.Tables[0]; dgvviewpendingsites.DefaultCellStyle.ForeColor = Color.Red; DataGridViewColumn column2 = dgvviewpendingsites.Columns[0]; column2.Width = 150; DataGridViewColumn column3 = dgvviewpendingsites.Columns[1]; column3.Width = 150; label18.Text = "CarId: " + carid; label22.Text = "CarId: " + carid; Cursor.Current = Cursors.Default; } // this.Opacity = 100; DataSet Eds = new DataSet(); Eds = objSubmitionDetailsBL.GetEmailData(); //DataSet dssitename = new DataSet; //dssitename = objSubmitionDetailsBL.MultiGetSiteList(); //comboBox1.DataSource = dssitename.Tables[0]; //comboBox1.DisplayMember = dssitename.Tables[0].Columns["SiteName"].ToString(); //comboBox1.ValueMember = dssitename.Tables[0].Columns["SmrtzSiteID"].ToString(); DataSet dssitename = new DataSet(); int tcarid = Convert.ToInt32(carid); dssitename = objSubmitionDetailsBL.MultiGetSiteNameTransation(tcarid); comboBox1.DataSource = dssitename.Tables[0]; comboBox1.DisplayMember = dssitename.Tables[0].Columns["SiteName"].ToString(); comboBox1.ValueMember = dssitename.Tables[0].Columns["SmrtzSiteID"].ToString(); } //----------for geting postedsitelist end-------------- }
private void btnpostupload_Click(object sender, EventArgs e) { textBox7.Focus(); textBox2.Focus(); if (comboBox2.Text != "") { try { count = 0; count++; Cursor.Current = Cursors.WaitCursor; com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); obUsedCarsInfo = objService.FindCarID(label10.Text); Globaltxtemail.txtemail = comboBox2.Text; Globalpwd.pwd = textBox2.Text; if (comboBox1.Text == "pinterest") { if (webBrowser1.Url.ToString() == "http://www.pinterest.com/vinayy5544/boards/" || webBrowser1.Url.ToString() == "http://www.pinterest.com/vinayy5544/boards/#") { // GeneralFunction.LinkInvoke(webBrowser1, "Create a board"); // GeneralFunction.LinkInvokeCollectorCarsPic(webBrowser1); //GeneralFunction.LinkInvokepintrest(webBrowser1, "BoardCreateRep Module"); //com.unitedcarexchange.CarsService objService = new com.unitedcarexchange.CarsService(); //IList<com.unitedcarexchange.UsedCarsInfo> obUsedCarsInfo = new List<com.unitedcarexchange.UsedCarsInfo>(); //obUsedCarsInfo = objService.FindCarID(label10.Text); IWebSites objClass = new Pintrest(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = false; //} } } if (Website == "CarPosts") { IWebSites objClass = new CarPosts(); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); Cursor.Current = Cursors.Default; btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; btnpostupload.Enabled = false; } if (Website == "clazorg") { clz++; clz1++; Cursor.Current = Cursors.WaitCursor; IWebSites objClass = new ClazOrg(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); Cursor.Current = Cursors.Default; btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; btnpostupload.Enabled = false; } if (Website == "JustgoodCars") { Cursor.Current = Cursors.WaitCursor; if (count == 1) { IWebSites objClass = new JustgoodCars(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); webBrowser1.Navigate("http://www.justgoodcars.com/members/advertise.php"); } if (count == 1) { webBrowser1.Navigate("http://www.justgoodcars.com/members/advertise.php"); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); btnpostupload.Enabled = false; } Cursor.Current = Cursors.Default; } if (Website == "Usadsciti") { // adsty++; Cursor.Current = Cursors.WaitCursor; IWebSites objClass = new Usadsciti(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); Cursor.Current = Cursors.Default; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; btnpostupload.Enabled = false; btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } if (Website == "www.adsciti.com") { // adsty++; Cursor.Current = Cursors.WaitCursor; IWebSites objClass = new Usadsciti(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); Cursor.Current = Cursors.Default; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; btnpostupload.Enabled = false; btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } else if (Website == "UsNetads") { Cursor.Current = Cursors.WaitCursor; IWebSites objClass = new UsnetAds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); Cursor.Current = Cursors.Default; btnpostupload.Enabled = false; btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; } else if (Website == " kugli") { Kug = 0; Kug++; IWebSites objClass = new Kugli(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } else if (Website == "jeanza") { IWebSites objClass = new Jeanza(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; btnpostupload.Enabled = false; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); } else if (Website == "classifiedsvalley") { circularProgressControl2.Start(); panel2.Visible = true; circularProgressControl2.Visible = true; IWebSites objClass = new classifiedsvalley(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); btnpostupload.Enabled = false; label27.ForeColor = System.Drawing.Color.Red; } else if (Website == "classifiedsciti") { IWebSites objClass = new classifiedsciti(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostupload.Enabled = false; btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; } else if (Website == "usa.motoseller.com") { IWebSites objClass = new Motoseller(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostupload.Enabled = false; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); motosl = 0; circularProgressControl2.Start(); panel2.Visible = true; circularProgressControl2.Visible = true; label49.Visible = true; } else if (Website == "americanclassifieds") { IWebSites objClass = new AmericanClassifieds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostupload.Enabled = false; btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; } else if (Website == "classifiedsforfree") { IWebSites objClass = new ClassifiedsForFree(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostupload.Enabled = false; btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; } else if (Website == "epage") { IWebSites objClass = new epage(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); btnpostupload.Enabled = false; circularProgressControl2.Start(); circularProgressControl2.Visible = true; panel2.Visible = true; } else if (Website == "highlandclassifieds") { //GeneralFunction.LinkInvoke(webBrowser1, "Cars and Trucks"); IWebSites objClass = new highlandclassifieds(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); btnpostupload.Enabled = false; circularProgressControl2.Start(); circularProgressControl2.Visible = true; panel2.Visible = true; } else if (Website == "classifiededition") { circularProgressControl2.Start(); panel2.Visible = true; circularProgressControl2.Visible = true; IWebSites objClass = new ClassifiedEditor(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); btnpostupload.Enabled = false; label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; } else if (Website == "www.autoii.com") { IWebSites objClass = new Autoii(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; btnpostupload.Enabled = false; } else if (Website == "www.postfreeadshere.com") { IWebSites objClass = new PostFreeAdshere(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); btnpostupload.Enabled = false; btnpostsubmit.Enabled = true; btnpostsubmit.Visible = true; } else if (Website == " www.freeadlists.com") { IWebSites objClass = new FreeAddList(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); } else if (Website == "adsriver") { label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); //GeneralFunction.LinkInvoke(webBrowser1, "Automotive"); Cursor.Current = Cursors.Default; circularProgressControl2.Stop(); circularProgressControl2.Visible = false; panel2.Visible = true; circularProgressControl2.Visible = true; btnpostsubmit.Visible = true; btnpostsubmit.Enabled = true; btnpostupload.Enabled = false; } else if (Website == "anunico") { textBox7.Focus(); anupic = 0; circularProgressControl2.Start(); panel2.Visible = true; circularProgressControl2.Visible = true; btnpostupload.Enabled = false; IWebSites objClass = new anunico(); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); label27.ForeColor = System.Drawing.Color.Red; objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } else if (Website == "classifieds4me") { cls4me = 0; // circularProgressControl2.Start(); // panel2.Visible = true; // circularProgressControl2.Visible = true; // IWebSites objClass = new classifieds4me(); // label27.Font = new System.Drawing.Font("Verdana", 8.0f, //System.Drawing.FontStyle.Bold); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); string suburl = webBrowser1.Url.ToString(); if (suburl.Contains("-classified-ads-")) { string split = suburl.ToString(); int index1 = split.IndexOf(".com/"); int end1 = split.IndexOf("-classified"); string c4mCity = split.ToString().Substring(index1, end1 - index1); c4mCity = c4mCity.Replace(".com/", ""); string split1 = suburl.ToString(); int index2 = split1.IndexOf("ads-"); int end2 = split.Length; string c4mCityId = split.ToString().Substring(index2, end2 - index2); c4mCityId = c4mCityId.Replace("/", ""); c4mCityId = c4mCityId.Replace("ads-", ""); if (webBrowser1.Url.ToString() == "http://www.classifieds4me.com/" + c4mCity + "-classified-ads-" + c4mCityId + "/") { GeneralFunction.LinkInvoke(webBrowser1, "Post a FREE Classified Ad"); } } } else if (Website == "myadmonster") { myads = 0; circularProgressControl2.Start(); circularProgressControl2.Visible = true; panel2.Visible = true; GeneralFunction.SetDropDownNameandValue(webBrowser1, "sel_action", "post_1"); GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, " Select And Continue "); } else if (Website == "99localsearch") { IWebSites objClass = new local99search(); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } else if (Website == "freead1.net") { IWebSites objClass = new freead1(); label27.Font = new System.Drawing.Font("Verdana", 8.0f,System.Drawing.FontStyle.Bold); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); } else if (Website == "facebook") { GeneralFunction.ButtonClickBYTypeAndValue(webBrowser1, "Log In"); } else if (Website == "adpost us") { GeneralFunction.LinkInvoke(webBrowser1, "United States"); } // else if (Website == "classifiedads") // { // IWebSites objClass = new ClassifiedAdds(); // label27.Font = new System.Drawing.Font("Verdana", 8.0f, //System.Drawing.FontStyle.Bold); // objClass.carpostfunc(webBrowser1, obUsedCarsInfo,rb_Trucks.Checked); // } else if (Website == "webcosmo") { // adsty++; IWebSites objClass = new WebCosmo(); objClass.carpostfunc(webBrowser1, obUsedCarsInfo, rb_Trucks.Checked); GeneralFunction.ButtonClickInvoke(webBrowser1, "ctl00$cphContent$ibContinue"); Cursor.Current = Cursors.WaitCursor; Cursor.Current = Cursors.Default; //label27.Font = new System.Drawing.Font("Verdana", 8.0f, System.Drawing.FontStyle.Bold); //label27.ForeColor = System.Drawing.Color.Red; //btnpostupload.Enabled = false; //btnpostsubmit.Enabled = true; //btnpostsubmit.Visible = true; } } catch (Exception ex) { MessageBox.Show("Temporarly Server is not Connecting .Please try after some times", "", MessageBoxButtons.OK, MessageBoxIcon.Hand); } } else { MessageBox.Show("Email text is empty;"); } textBox7.Focus(); }