Ejemplo n.º 1
0
    protected void btnConfirm_Click(object sender, EventArgs e)
    {
        string catName   = tbName.Text.Trim();
        int    sortOrder = tbSortOrder.Text.Trim().ToArrowInt();

        if (catName.ValidateIsNullOrEmpty("请输入分类名称!"))
        {
            return;
        }

        var model = new TMS.GoodsCatInfo();

        model.IsDel     = 0;
        model.Name      = catName;
        model.Remarks   = "";
        model.SortOrder = sortOrder;

        GoodsBLL.AddGoodsCat(model);

        tbName.Text      = "";
        tbSortOrder.Text = "";
        MessageBox.Show("添加成功!");
        BindData();
    }