示例#1
0
    /// ****************************************************************************
    /// <summary>
    /// 数据加载
    /// </summary>
    /// ****************************************************************************
    private void LoadData(bool Flag)
    {
        if (Request["TemplateOpinionCode"] + "" != "")
        {
            TemplateOpinion cTemplateOpinion = new TemplateOpinion();
            cTemplateOpinion.TemplateOpinionCode = Request["TemplateOpinionCode"] + "";

            if (Flag)
            {
                this.txtName.Value   = cTemplateOpinion.Name;
                this.txtCenter.Value = cTemplateOpinion.Center;
            }
            else
            {
                this.tdName.InnerHtml   = cTemplateOpinion.Name;
                this.tdCenter.InnerHtml = cTemplateOpinion.Center.Replace("\n", "<br>");;
            }
        }
        else
        {
            if (Flag)
            {
            }
        }
    }
示例#2
0
    /// ****************************************************************************
    /// <summary>
    /// 删除数据
    /// </summary>
    /// ****************************************************************************
    public void Delete()
    {
        TemplateOpinion cTemplateOpinion = new TemplateOpinion();

        cTemplateOpinion.TemplateOpinionCode = Request["TemplateOpinionCode"] + "";
        cTemplateOpinion.TemplateOpinionDelete();
    }
示例#3
0
    /// ****************************************************************************
    /// <summary>
    /// 数据加载
    /// </summary>
    /// ****************************************************************************
    private void LoadData()
    {
        try
        {
            TemplateOpinion cTemplateOpinion = new TemplateOpinion();
            cTemplateOpinion.UserCode = user.UserCode;

            DataTable dt = cTemplateOpinion.GetTemplateOpinions();
            this.dgList.DataSource = dt;
            this.dgList.DataBind();
            this.gpControl.RowsCount = dt.Rows.Count.ToString();
            dt.Dispose();
        }
        catch (Exception ex)
        {
            ApplicationLog.WriteLog(this.ToString(), ex, "");
        }
    }
示例#4
0
    /// ****************************************************************************
    /// <summary>
    /// 提交数据
    /// </summary>
    /// ****************************************************************************
    public string SubmitData()
    {
        string ErrMsg = "";

        if (this.txtName.Value == "")
        {
            ErrMsg = "标题不能为空";
            Response.Write(Rms.Web.JavaScript.Alert(true, ErrMsg));
            return(ErrMsg);
        }
        TemplateOpinion cTemplateOpinion = new TemplateOpinion();

        cTemplateOpinion.TemplateOpinionCode = Request["TemplateOpinionCode"] + "";
        cTemplateOpinion.Name     = this.txtName.Value;
        cTemplateOpinion.Center   = this.txtCenter.Value;
        cTemplateOpinion.UserCode = user.UserCode;
        cTemplateOpinion.TemplateOpinionSubmit();
        return("");
    }