コード例 #1
0
ファイル: ContentManager.cs プロジェクト: honj51/ideacode
 public bool UAddRe(Content content)
 {
     int i = 0;
     i=icontent.UAddRe(content);
     if (i != 0)
         return true;
     else
         return false;
 }
コード例 #2
0
ファイル: ContentManager.cs プロジェクト: honj51/ideacode
 public bool Add(Content content)
 {
     int i = 0;
     i = icontent.Add(content);
     if (i != 0)
         return true;
     else
         return false;
 }
コード例 #3
0
    protected void Button1_Click1(object sender, EventArgs e)
    {
        LiveSupport.LiveSupportModel.Content ad = new LiveSupport.LiveSupportModel.Content();
        ad.UserName = txtName.Text.Trim();
        ad.PicUrl = ddllPic.SelectedValue.ToString();
        ad.UserMail = txtEmail.Text.Trim();
        ad.UserUrl = txtUrl.Text.Trim();
        ad.UserQQ = txtQQ.Text.Trim();

        string faceurl = "";
        if (this.Radio1.Checked) { faceurl = "Imgs/face/face1.gif"; }
        if (this.Radio2.Checked) { faceurl = "Imgs/face/face2.gif"; }
        if (this.Radio3.Checked) { faceurl = "Imgs/face/face3.gif"; }
        if (this.Radio4.Checked) { faceurl = "Imgs/face/face4.gif"; }
        if (this.Radio5.Checked) { faceurl = "Imgs/face/face5.gif"; }
        if (this.Radio6.Checked) { faceurl = "Imgs/face/face6.gif"; }
        if (this.Radio7.Checked) { faceurl = "Imgs/face/face7.gif"; }
        if (this.Radio8.Checked) { faceurl = "Imgs/face/face8.gif"; }
        if (this.Radio9.Checked) { faceurl = "Imgs/face/face9.gif"; }
        if (this.Radio10.Checked) { faceurl = "Imgs/face/face10.gif"; }
        if (this.Radio11.Checked) { faceurl = "Imgs/face/face11.gif"; }
        if (this.Radio12.Checked) { faceurl = "Imgs/face/face12.gif"; }
        if (this.Radio13.Checked) { faceurl = "Imgs/face/face13.gif"; }
        if (this.Radio14.Checked) { faceurl = "Imgs/face/face14.gif"; }
        if (this.Radio15.Checked) { faceurl = "Imgs/face/face15.gif"; }
        if (this.Radio16.Checked) { faceurl = "Imgs/face/face16.gif"; }
        if (this.Radio17.Checked) { faceurl = "Imgs/face/face17.gif"; }
        if (this.Radio18.Checked) { faceurl = "Imgs/face/face18.gif"; }
        if (this.Radio19.Checked) { faceurl = "Imgs/face/face19.gif"; }
        if (this.Radio20.Checked) { faceurl = "Imgs/face/face20.gif"; }
        ad.FaceUrl = faceurl;
        ad.UserIp = HttpContext.Current.Request.UserHostAddress;

        ad.Contents = FCKeditor1.Value;
        ad.AddTime = System.DateTime.Now;
        if (CheckBox1.Checked == true)
            ad.IsHid = 1;
        else
            ad.IsHid = 0;

        ContentManager bll = new ContentManager();
        if (bll.Add(ad))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('留言发表成功!'); window.location='LiveSupportLeaveWord.aspx';</script>");
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('发表失败!');</script>");
        }
    }
コード例 #4
0
ファイル: Reply.aspx.cs プロジェクト: honj51/ideacode
    protected void Button1_Click(object sender, EventArgs e)
    {
        LiveSupport.LiveSupportModel.Content mo = new LiveSupport.LiveSupportModel.Content();
        mo.Id = int.Parse(Request.QueryString["id"]);
        mo.Reply = FCKeditor1.Value;

        ContentManager bll = new ContentManager();
        if (bll.UAddRe(mo))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('回复成功!'); window.location='LiveSupportLeaveWord.aspx';</script>");
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('回复不成功!');</script>");
        }
    }
コード例 #5
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        LiveSupport.LiveSupportModel.Content mo = new LiveSupport.LiveSupportModel.Content();
        mo.Id    = int.Parse(Request.QueryString["id"]);
        mo.Reply = FCKeditor1.Value;

        ContentManager bll = new ContentManager();

        if (bll.UAddRe(mo))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('回复成功!'); window.location='LiveSupportLeaveWord.aspx';</script>");
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('回复不成功!');</script>");
        }
    }
コード例 #6
0
ファイル: SqlContentProvider.cs プロジェクト: honj51/ideacode
 public int UAddRe(Content content)
 {
     string sql = string.Format("update LiveSupport_Content set Reply='{0}' where Id='{1}'", content.Reply, content.Id);
     return DBHelper.ExecuteSql(sql);
 }
コード例 #7
0
ファイル: SqlContentProvider.cs プロジェクト: honj51/ideacode
 public int Add(Content content)
 {
     string sql = string.Format("insert into LiveSupport_Content(UserName,UserEmail,UserQQ,UserUrl,UserIp,faceUrl,PicUrl,AddTime,Content,Reply,IsHid,IsReply)" +
     " values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}',{10},{11})",content.UserName,content.UserMail,content.UserQQ,content.UserUrl,content.UserIp,content.FaceUrl,content.PicUrl,content.AddTime,content.Contents,content.Reply,content.IsHid,content.IsReply);
     return DBHelper.ExecuteSql(sql);
 }
コード例 #8
0
    protected void Button1_Click1(object sender, EventArgs e)
    {
        LiveSupport.LiveSupportModel.Content ad = new LiveSupport.LiveSupportModel.Content();
        ad.UserName = txtName.Text.Trim();
        ad.PicUrl   = ddllPic.SelectedValue.ToString();
        ad.UserMail = txtEmail.Text.Trim();
        ad.UserUrl  = txtUrl.Text.Trim();
        ad.UserQQ   = txtQQ.Text.Trim();

        string faceurl = "";

        if (this.Radio1.Checked)
        {
            faceurl = "Imgs/face/face1.gif";
        }
        if (this.Radio2.Checked)
        {
            faceurl = "Imgs/face/face2.gif";
        }
        if (this.Radio3.Checked)
        {
            faceurl = "Imgs/face/face3.gif";
        }
        if (this.Radio4.Checked)
        {
            faceurl = "Imgs/face/face4.gif";
        }
        if (this.Radio5.Checked)
        {
            faceurl = "Imgs/face/face5.gif";
        }
        if (this.Radio6.Checked)
        {
            faceurl = "Imgs/face/face6.gif";
        }
        if (this.Radio7.Checked)
        {
            faceurl = "Imgs/face/face7.gif";
        }
        if (this.Radio8.Checked)
        {
            faceurl = "Imgs/face/face8.gif";
        }
        if (this.Radio9.Checked)
        {
            faceurl = "Imgs/face/face9.gif";
        }
        if (this.Radio10.Checked)
        {
            faceurl = "Imgs/face/face10.gif";
        }
        if (this.Radio11.Checked)
        {
            faceurl = "Imgs/face/face11.gif";
        }
        if (this.Radio12.Checked)
        {
            faceurl = "Imgs/face/face12.gif";
        }
        if (this.Radio13.Checked)
        {
            faceurl = "Imgs/face/face13.gif";
        }
        if (this.Radio14.Checked)
        {
            faceurl = "Imgs/face/face14.gif";
        }
        if (this.Radio15.Checked)
        {
            faceurl = "Imgs/face/face15.gif";
        }
        if (this.Radio16.Checked)
        {
            faceurl = "Imgs/face/face16.gif";
        }
        if (this.Radio17.Checked)
        {
            faceurl = "Imgs/face/face17.gif";
        }
        if (this.Radio18.Checked)
        {
            faceurl = "Imgs/face/face18.gif";
        }
        if (this.Radio19.Checked)
        {
            faceurl = "Imgs/face/face19.gif";
        }
        if (this.Radio20.Checked)
        {
            faceurl = "Imgs/face/face20.gif";
        }
        ad.FaceUrl = faceurl;
        ad.UserIp  = HttpContext.Current.Request.UserHostAddress;

        ad.Contents = FCKeditor1.Value;
        ad.AddTime  = System.DateTime.Now;
        if (CheckBox1.Checked == true)
        {
            ad.IsHid = 1;
        }
        else
        {
            ad.IsHid = 0;
        }

        ContentManager bll = new ContentManager();

        if (bll.Add(ad))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('留言发表成功!'); window.location='LiveSupportLeaveWord.aspx';</script>");
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('发表失败!');</script>");
        }
    }