Example #1
0
 protected void qued_Click(object sender, EventArgs e)
 {
     if (f_id.Text != "未选择")
     {
         if (TextBox1.Text != "")
         {
             Model.fathercate mym = new Model.fathercate();
             mym.fathercateid = Convert.ToInt32(f_id.Text);
             mym.fathername   = TextBox1.Text;
             BLL.fathercate myb    = new BLL.fathercate();
             int            result = myb.update(mym);
             if (result > 0)
             {
                 msg("更改成功!");
                 TextBox1.Text = "";
                 f_id.Text     = "未选择";
                 bing();
             }
         }
         else
         {
             msg("类明不能为空");
         }
     }
     else
     {
         msg("未选择");
     }
 }
    protected void tijiao_Click(object sender, EventArgs e)
    {
        if (fathercatename.Text != null)
        {
            Model.fathercate mym = new Model.fathercate();
            mym.fathername = fathercatename.Text;

            BLL.fathercate myb    = new BLL.fathercate();
            int            result = myb.insert(mym);
            if (result > 0)
            {
                msg("添加成功!!");
                fathercatename.Text = "";
            }
            else
            {
                msg("添加失败!!");
            }
        }
    }
Example #3
0
    protected void tijiao_Click(object sender, EventArgs e)
    {
        if (fathercatename.Text != null)
        {
            Model.fathercate mym = new Model.fathercate();
            mym.fathername = fathercatename.Text;

            BLL.fathercate myb = new BLL.fathercate();
            int result = myb.insert(mym);
            if (result > 0)
            {
                msg("添加成功!!");
                fathercatename.Text = "";
            }
            else
            {
                msg("添加失败!!");
            }

        }
    }
Example #4
0
    protected void qued_Click(object sender, EventArgs e)
    {
        if (f_id.Text != "未选择")
        {
            if (TextBox1.Text !="")
            {
                Model.fathercate mym = new Model.fathercate();
                mym.fathercateid = Convert.ToInt32(f_id.Text);
                mym.fathername = TextBox1.Text;
                BLL.fathercate myb = new BLL.fathercate();
                int result = myb.update(mym);
                if (result > 0)
                {
                    msg("更改成功!");
                    TextBox1.Text = "";
                    f_id.Text = "未选择";
                    bing();
                }

            }
            else
            {
                msg("类明不能为空");
            }
        }
        else
        {
            msg("未选择");
        }
    }