Ejemplo n.º 1
0
    private bool DoEdit(int _id)
    {
        bool result = false;

        tbl_sinkia_advert model = new tbl_sinkia_advert();
        //if (model.Exists(txttitle.Text.Trim(), _id))
        //{
        //    mym.JscriptMsg(this.Page, "您输入的类别名称已经存在,请检查!", "", "Error");
        //    return false;
        //}
        model.GetModel(_id);
        model.advert_title=title.Text;
        model.picture1 = txtImgUrl_mob.Text;
        model.sort_id = int.Parse(txtSortId.Text.Trim());
        model.p1_url = pid.Text;
        //model.beiyong4 = txtImgUrl_mob1.Text;
        //model.beiyong5 = txtImgUrl_mob2.Text;
        if (model.Update())
        {
            // mym.AddAdminLog("修改", "修改商品类别:" + txttitle.Text); //记录日志
            result = true;
        }

        return result;
    }
Ejemplo n.º 2
0
    private void ShowInfo(int _id)
    {
        tbl_sinkia_advert model = new tbl_sinkia_advert();
        model.GetModel(_id);
        title.Text = model.advert_title;
        txtSortId.Text = model.sort_id.ToString();
        txtImgUrl_mob.Text = model.picture1;
        //txtImgUrl_mob1.Text = model.beiyong4;
        //txtImgUrl_mob2.Text = model.beiyong5;
        pid.Text = model.p1_url.ToString();

    }