Ejemplo n.º 1
0
    private void ShowInfo(int _id)
    {
        tbl_erweima model = new tbl_erweima();

        model.GetModel(_id);

        txttitle.Text      = model.home_title;
        txtImgUrl_com.Text = model.home_code;
    }
Ejemplo n.º 2
0
    private bool DoEdit(int _id)
    {
        bool result = false;

        tbl_erweima model = new tbl_erweima();

        if (model.Exists(txttitle.Text.Trim(), _id))
        {
            mym.JscriptMsg(this.Page, "您输入的名称已经存在,请检查!", "", "Error");
            return(false);
        }
        model.GetModel(_id);

        model.home_title = txttitle.Text.Trim();
        model.home_code  = txtImgUrl_com.Text;

        if (model.Update())
        {
            // mym.AddAdminLog("修改", "修改商品类别:" + txttitle.Text); //记录日志
            result = true;
        }

        return(result);
    }