Ejemplo n.º 1
0
        /// <summary>
        /// 提交回复
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton_replay_submit_Click(object sender, EventArgs e)
        {
            try
            {
                string   id_index      = ((LinkButton)sender).CommandArgument.ToString();
                string[] arrays        = id_index.Split('|');
                Label    re_contents_l = (Label)GridView1.Rows[int.Parse(arrays[1].ToString())].Cells[0].FindControl("Label_reContents");
                TextBox  re_contents_t = (TextBox)GridView1.Rows[int.Parse(arrays[1].ToString())].Cells[0].FindControl("TextBox_reContents");

                mbook = bbook.GetModel(arrays[0].ToString());
                if (mbook != null)
                {
                    mbook.RE_CONTENTS  = re_contents_t.Text.ToString() + "[" + Session["USERNAME_SYSUSER"].ToString() + " 于 " + DateTime.Now.ToString() + " 回复]";
                    mbook.RE_DATETIME  = DateTime.Now;
                    mbook.STATUS       = 1;
                    re_contents_l.Text = mbook.RE_CONTENTS.ToString();
                    re_contents_t.Text = mbook.RE_CONTENTS.ToString();

                    bbook.Update(mbook);
                }


                re_contents_t.Visible = false;
                re_contents_l.Visible = true;

                LinkButton LinkButton_replay_1        = (LinkButton)GridView1.Rows[int.Parse(arrays[1].ToString())].Cells[0].FindControl("LinkButton_replay");        //回复的按钮
                LinkButton LinkButton_replay_submit_1 = (LinkButton)GridView1.Rows[int.Parse(arrays[1].ToString())].Cells[0].FindControl("LinkButton_replay_submit"); //提交回复的按钮
                LinkButton_replay_1.Visible        = true;
                LinkButton_replay_submit_1.Visible = false;
            }
            catch
            {
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 在前台显示
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton_show_Click(object sender, EventArgs e)
        {
            try
            {
                string   id_index = ((LinkButton)sender).CommandArgument.ToString();
                string[] arrays   = id_index.Split('|');

                mbook = bbook.GetModel(arrays[0].ToString());
                if (mbook != null)
                {
                    mbook.STATUS = 1;
                    bbook.Update(mbook);
                }


                int    page   = Convert.ToInt32(pageindexHidden.Value.ToString());
                string KeySel = TextBox_KEYS.Text.ToString();
                ShowKcList(page, KeySel);//调用显示
            }
            catch
            {
            }
        }