当前位置: 首页>>代码示例>>C#>>正文


C# DBLayer.GetTourismlistContent方法代码示例

本文整理汇总了C#中DBLayer.GetTourismlistContent方法的典型用法代码示例。如果您正苦于以下问题:C# DBLayer.GetTourismlistContent方法的具体用法?C# DBLayer.GetTourismlistContent怎么用?C# DBLayer.GetTourismlistContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DBLayer的用法示例。


在下文中一共展示了DBLayer.GetTourismlistContent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["TID"] != null && !string.IsNullOrEmpty(Request.QueryString["TID"]))
         {
             uiPanelAllLists.Visible = false;
             uiPanelViewTourismList.Visible = true;
             int id = Convert.ToInt32(Request.QueryString["TID"].ToString());
             DBLayer db = new DBLayer();
             DataSet ds = new DataSet();
             ds = db.GetTourismlistContent(id);
             uiImageTourismList.ImageUrl = ds.Tables[0].Rows[0]["arImagePath"].ToString();
             uiLabelTitle.Text = ds.Tables[0].Rows[0]["arTitle"].ToString();
             uiLiteralBrief.Text = ds.Tables[0].Rows[0]["arBrief"].ToString();
             uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["arContent"].ToString());
         }
         else
         {
             uiPanelAllLists.Visible = true;
             uiPanelViewTourismList.Visible = false;
             BindData();
         }
     }
     RegisterStartupScript("menu", "<script type='text/javascript'>$(\"#m3\").addClass(\"selected\");</script>");
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:26,代码来源:TourismList.aspx.cs

示例2: uiLinkButtonSubmit_Click

        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("[email protected]");
                msg.From = new MailAddress("[email protected]");
                //msg.From = new MailAddress("[email protected]");

                msg.Subject = " Email from booking page";
                msg.IsBodyHtml = true;
                msg.BodyEncoding = System.Text.Encoding.Unicode;

                msg.Body = " الإسم : " + uiDropDownListTitle.Text + " " + uiTextBoxName.Text;
                msg.Body += "<br/> البريد الإلكترونى : " + uiTextBoxEmail.Text;
                msg.Body += "<br/> الشارع : " + uiTextBoxStreet.Text;
                msg.Body += "<br/> المدينة : " + uiTextBoxCity.Text;
                msg.Body += "<br/> الرقم البريدى : " + uiTextBoxPostalCode.Text;
                msg.Body += "<br/> البلد : " + uiTextBoxCountry.Text;
                msg.Body += "<br/> التليفون : " + uiTextBoxTelephone.Text;
                msg.Body += "<br/> الموبايل : " + uiTextBoxMobile.Text;
                msg.Body += "<br/> إسم الرحلة : " + ds.Tables[0].Rows[0]["Title"].ToString();
                msg.Body += "<br/> تفاصيل  الرحلة : " + Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString());

                msg.Body += "<br/> الرابط على الموقع : " + 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("[email protected]", "obtravelmail");
                //client.Credentials = new System.Net.NetworkCredential("[email protected]", "********");
                client.Send(msg);
                uiLabelMessage.Visible = true;
            }
            catch (Exception ex)
            {
                uiLabelMessage.Visible = true;
                uiLabelMessage.Text = ex.Message;
            }
        }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:53,代码来源:TourismList.aspx.cs

示例3: uiLinkButtonUpdate_Click

 protected void uiLinkButtonUpdate_Click(object sender, EventArgs e)
 {
     DBLayer db = new DBLayer();
     string imagepath = "";
     if (uiFileUploadImage.HasFile)
     {
         uiFileUploadImage.SaveAs(Server.MapPath(ConfigurationManager.AppSettings["UserFilePath"] + "UploadedImages/" + uiFileUploadImage.FileName));
         imagepath = ConfigurationManager.AppSettings["UserFilePath"] + "UploadedImages/" + uiFileUploadImage.FileName;
     }
     // update
     if (CurrentList != 0)
     {
         DataSet ds = new DataSet();
         ds = db.GetTourismlistContent(CurrentList);
         string temp = ds.Tables[0].Rows[0]["Imagepath"].ToString();
         if (temp != imagepath && string.IsNullOrEmpty(imagepath))
             db.SetEnglishTourismContent(CurrentList, uiTextBoxBrief.Text, Server.HtmlEncode(uiFCKeditorContent.Value), uiTextBoxTitle.Text, temp, Convert.ToInt32(uiTextBoxOrder.Text), ParentPackage, uiCheckBoxViewInWeb.Checked);
         else
             db.SetEnglishTourismContent(CurrentList, uiTextBoxBrief.Text, Server.HtmlEncode(uiFCKeditorContent.Value), uiTextBoxTitle.Text, imagepath, Convert.ToInt32(uiTextBoxOrder.Text), ParentPackage, uiCheckBoxViewInWeb.Checked);
     }
     else // add new
     {
         db.AddEnglishTourismlistContent(uiTextBoxBrief.Text, Server.HtmlEncode(uiFCKeditorContent.Value), uiTextBoxTitle.Text, imagepath, Convert.ToInt32(uiTextBoxOrder.Text), ParentPackage, uiCheckBoxViewInWeb.Checked);
     }
     uiPanelViewLists.Visible = true;
     uiPanelEditTourismList.Visible = false;
     ClearFields();
     CurrentList = 0;
     BindData();
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:30,代码来源:EditTourismLists.aspx.cs

示例4: uiRepeaterTourismLists_ItemCommand

 protected void uiRepeaterTourismLists_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "EditList")
     {
         CurrentList = Convert.ToInt32(e.CommandArgument.ToString());
         DBLayer db = new DBLayer();
         DataSet ds = new DataSet();
         ds = db.GetTourismlistContent(CurrentList);
         uiTextBoxBrief.Text = ds.Tables[0].Rows[0]["Brief"].ToString();
         uiTextBoxOrder.Text = ds.Tables[0].Rows[0]["Order"].ToString();
         uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
         uiCheckBoxViewInWeb.Checked = (bool)ds.Tables[0].Rows[0]["ViewInWeb"];
         uiFCKeditorContent.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString());
         if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Imagepath"].ToString()))
         {
             uiImageCurrent.ImageUrl = ds.Tables[0].Rows[0]["Imagepath"].ToString();
             uiImageCurrent.Visible = true;
         }
         else
         {
             uiImageCurrent.Visible = false;
         }
         uiPanelViewLists.Visible = false;
         uiPanelEditTourismList.Visible = true;
     }
     else if (e.CommandName == "DeleteList")
     {
         DBLayer db = new DBLayer();
         db.DeleteTourismList(Convert.ToInt32(e.CommandArgument.ToString()));
         BindData();
     }
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:32,代码来源:EditTourismLists.aspx.cs


注:本文中的DBLayer.GetTourismlistContent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。