private void btnInStore_Click(object sender, EventArgs e)
        {
            FrmCustomer_Oper frm = new FrmCustomer_Oper();

            frm.ShowDialog();

            BindData();
        }
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            FrmCustomer_Oper frmEdit = new FrmCustomer_Oper(String.Empty, true);

            if (frmEdit.ShowDialog() == DialogResult.OK)
            {
                BindData();
            }
        }
        private void superGridControl1_CellMouseDown(object sender, DevComponents.DotNetBar.SuperGrid.GridCellMouseEventArgs e)
        {
            Customer entity = Dbers.GetInstance().SelfDber.Get <Customer>(superGridControl1.PrimaryGrid.GetCell(e.GridCell.GridRow.Index, superGridControl1.PrimaryGrid.Columns["clmId"].ColumnIndex).Value.ToString());

            switch (superGridControl1.PrimaryGrid.Columns[e.GridCell.ColumnIndex].Name)
            {
            case "clmShow":
                FrmCustomer_Oper frmShow = new FrmCustomer_Oper(entity.Id, false);
                if (frmShow.ShowDialog() == DialogResult.OK)
                {
                    BindData();
                }
                break;

            case "clmEdit":
                FrmCustomer_Oper frmEdit = new FrmCustomer_Oper(entity.Id, true);
                if (frmEdit.ShowDialog() == DialogResult.OK)
                {
                    BindData();
                }
                break;

            case "clmDelete":
                // 查询正在使用该单位名称的车数
                if (MessageBoxEx.Show("确定要删除该记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    try
                    {
                        Dbers.GetInstance().SelfDber.Delete <Customer>(entity.Id);
                    }
                    catch (Exception)
                    {
                        MessageBoxEx.Show("该记录正在使用中,禁止删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }

                    BindData();
                }
                break;
            }
        }