Beispiel #1
0
    private bool DoAdd()
    {
        tbl_sinkia_class model = new tbl_sinkia_class();

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

        model.pro_class      = txttitle.Text.Trim();
        model.sort_id        = int.Parse(txtSortId.Text.Trim());
        model.class_mob_img  = txtImgUrl_mob.Text;
        model.class_shop_img = txtImgUrl_com.Text;
        if (is_show.Checked == true)
        {
            model.is_show = 1;
        }
        else
        {
            model.is_show = 0;
        }

        if (model.Add() > 0)
        {
            // mym.AddAdminLog("增加", "添加商品类别:" + txttitle.Text); //记录日志
            return(true);
        }

        return(false);
    }
Beispiel #2
0
    private bool DoAdd()
    {
        tbl_sinkia_class model = new tbl_sinkia_class();

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

        model.pro_class      = txttitle.Text.Trim();
        model.class_shop_img = txtImgUrl_com.Text;

        if (model.Add() > 0)
        {
            // mym.AddAdminLog("增加", "添加商品类别:" + txttitle.Text); //记录日志
            return(true);
        }

        return(false);
    }