/// <summary>
        /// 加载所有列表
        /// </summary>
        private void LoadALLList()
        {
            //调用BLL获取所有的商品列表
            KPS.BLL.SupplierManager manager = new BLL.SupplierManager();
            RecordList = manager.GetModelList("");

            ReaLoadSpList();//重新加载列表
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(textBox1.Text.Trim()))
            {
                KPS.Model.Supplier spinfo = new Model.Supplier();
                spinfo.supplierName = textBox1.Text.Trim();
                if (isSelUnit)
                {
                    //调用BLL获取所有的用户列表
                    KPS.BLL.SupplierManager manager = new BLL.SupplierManager();
                    RecordList = manager.GetModelList(string.Format("supplierName like '%{0}%'", spinfo.supplierName));

                    ReaLoadSpList();//重新加载列表
                }
                else
                {
                    //调用BLL获取所有的用户列表
                    KPS.BLL.SupplierManager manager = new BLL.SupplierManager();
                    if (manager.Add(spinfo))
                    {
                        spinfo.supplierID = manager.GetMaxId();
                    }
                    if (spinfo.supplierID != null && spinfo.supplierID != 0)
                    {
                        if (RecordList == null)
                        {
                            RecordList = new List<Supplier>();
                        }
                        RecordList.Add(spinfo);

                        ReaLoadSpList();
                        MessageBox.Show("添加成功!");
                    }
                    else
                    {
                        MessageBox.Show("添加失败!");
                    }
                }
            }
            else
            {
                MessageBox.Show("名称不可为空!");
            }
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(textBox1.Text.Trim()))
            {
                KPS.Model.Supplier spinfo = new Model.Supplier();
                spinfo.supplierName = textBox1.Text.Trim();
                if (isSelUnit)
                {
                    //调用BLL获取所有的用户列表
                    KPS.BLL.SupplierManager manager = new BLL.SupplierManager();
                    RecordList = manager.GetModelList(string.Format("supplierName like '%{0}%'", spinfo.supplierName));

                    ReaLoadSpList();//重新加载列表
                }
                else
                {
                    //调用BLL获取所有的用户列表
                    KPS.BLL.SupplierManager manager = new BLL.SupplierManager();
                    if (manager.Add(spinfo))
                    {
                        spinfo.supplierID = manager.GetMaxId();
                    }
                    if (spinfo.supplierID != null && spinfo.supplierID != 0)
                    {
                        if (RecordList == null)
                        {
                            RecordList = new List <Supplier>();
                        }
                        RecordList.Add(spinfo);

                        ReaLoadSpList();
                        MessageBox.Show("添加成功!");
                    }
                    else
                    {
                        MessageBox.Show("添加失败!");
                    }
                }
            }
            else
            {
                MessageBox.Show("名称不可为空!");
            }
        }
        /// <summary>
        /// 加载所有列表
        /// </summary>
        private void LoadALLList()
        {
            //调用BLL获取所有的商品列表
            KPS.BLL.SupplierManager manager = new BLL.SupplierManager();
            RecordList = manager.GetModelList("");

            ReaLoadSpList();//重新加载列表
        }