protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["SID"] != null && !string.IsNullOrEmpty(Request.QueryString["SID"])) { uiPanelAllServices.Visible = false; uiPanelViewService.Visible = true; int id = Convert.ToInt32(Request.QueryString["SID"].ToString()); DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetServicesContent(id); uiImageService.ImageUrl = ds.Tables[0].Rows[0]["ImagePath"].ToString(); uiLabelTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString(); uiLiteralBrief.Text = ds.Tables[0].Rows[0]["Brief"].ToString(); uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString()); } else { uiPanelAllServices.Visible = true; uiPanelViewService.Visible = false; BindData(); } } RegisterStartupScript("menu", "<script type='text/javascript'>$(\"#m4\").addClass(\"selected\");</script>"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetPageContent(2); uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString()); } RegisterStartupScript("menu", "<script type='text/javascript'>$(\"#m5\").addClass(\"selected\");</script>"); }
protected void uiLinkButtonSubmit_Click(object sender, EventArgs e) { try { int id = Convert.ToInt32(Request.QueryString["TID"].ToString()); DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetTourismlistContent(id); MailMessage msg = new MailMessage(); DataSet to = db.GetAllMails(); foreach (DataRow item in to.Tables[0].Rows) { msg.To.Add(item["Email"].ToString()); } //msg.To.Add("*****@*****.**"); msg.From = new MailAddress("*****@*****.**"); //msg.From = new MailAddress("*****@*****.**"); msg.Subject = " Email from booking page"; msg.IsBodyHtml = true; msg.BodyEncoding = System.Text.Encoding.Unicode; msg.Body = " Name : " + uiDropDownListTitle.Text + " " + uiTextBoxName.Text; msg.Body += "<br/> Email : " + uiTextBoxEmail.Text; msg.Body += "<br/> Street : " + uiTextBoxStreet.Text; msg.Body += "<br/> City : " + uiTextBoxCity.Text; msg.Body += "<br/> Postal Code : " + uiTextBoxPostalCode.Text; msg.Body += "<br/> Country : " + uiTextBoxCountry.Text; msg.Body += "<br/> Telephone : " + uiTextBoxTelephone.Text; msg.Body += "<br/> Mobile : " + uiTextBoxMobile.Text; msg.Body += "<br/> Package Name : " + ds.Tables[0].Rows[0]["Title"].ToString(); msg.Body += "<br/> Package Details : " + Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString()); msg.Body += "<br/> URL : " + Request.Url; SmtpClient client = new SmtpClient("mail.obtravel-eg.com", 25); //SmtpClient client = new SmtpClient("smtp.gmail.com", 587); //client.EnableSsl = true; client.UseDefaultCredentials = false; //client.EnableSsl = true; client.Credentials = new System.Net.NetworkCredential("*****@*****.**", "obtravelmail"); //client.Credentials = new System.Net.NetworkCredential("*****@*****.**", "********"); client.Send(msg); uiLabelMessage.Visible = true; } catch (Exception ex) { uiLabelMessage.Visible = true; uiLabelMessage.Text = ex.Message; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetBlockContent(1); uiLabelTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString(); uiLabelContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Brief"].ToString()); uiImageBlock.ImageUrl = ds.Tables[0].Rows[0]["ImagePath"].ToString(); } }
protected void uiLinkButtonSubmit_Click(object sender, EventArgs e) { DBLayer db = new DBLayer(); if (db.AddContactForm(uiTextBoxTelephone.Text, uiTextBoxMobile.Text, uiTextBoxEmail.Text, uiTextBoxSubject.Text,uiTextBoxName.Text,uiTextBoxStreet.Text,uiTextBoxCity.Text,uiTextBoxPostalCode.Text,uiTextBoxCountry.Text,uiDropDownListTitle.Text,Convert.ToInt32(uiDropDownListSection.SelectedValue))) { uiLabelSuccess.Visible = true; uiLabelFail.Visible = false; } else { uiLabelFail.Visible = true; uiLabelSuccess.Visible = false; } }
private void BindData() { DBLayer db = new DBLayer(); uiRepeaterCurrentLists.DataSource = db.GetEnglishPackages(); uiRepeaterCurrentLists.DataBind(); }
private void BindData() { DBLayer db = new DBLayer(); uiRepeaterCurrentServices.DataSource = db.GetEnglishServices(); uiRepeaterCurrentServices.DataBind(); }
private void BindData() { DBLayer db = new DBLayer(); if (Session["TopPackage"] != null && !string.IsNullOrEmpty(Session["TopPackage"].ToString())) { //uiRepeaterCurrentLists.DataSource = db.GetEnglishTourismlists(Convert.ToInt32(Session["TopPackage"].ToString())); //uiRepeaterCurrentLists.DataBind(); uiDataListCurrentLists.DataSource = db.GetEnglishTourismlists(Convert.ToInt32(Session["TopPackage"].ToString()),false); uiDataListCurrentLists.DataBind(); } else { Response.Redirect("Packages.aspx"); } }