예제 #1
0
파일: MainForm.cs 프로젝트: demonzhq/Mine
        private void CreateTab(string text)
        {
            if (CheckPermission(text) != DialogResult.OK)
            {
                MessageBox.Show("对不起,该用户没有权限做此操作!", "提示信息");
                return;
            }

            IDockContent content = FindTab(text);

            if (content != null)
            {
                content.DockHandler.Show();
            }
            else
            {
                switch (text)
                {
                case "建当":
                    CreatePawnForm frmCreatePawn = new CreatePawnForm();
                    frmCreatePawn.Show(this.dockPanel1);
                    break;

                case "添加客户信息":
                    AddCustomerForm frmAddCustomer = new AddCustomerForm();
                    frmAddCustomer.Show(this.dockPanel1);
                    break;

                case "客户查询":
                    SearchCustomerForm frmSearchCustomre = new SearchCustomerForm();
                    frmSearchCustomre.Show(this.dockPanel1);
                    break;

                case "客户历史查询":
                    CustomerHistoryForm frmCustomerHistory = new CustomerHistoryForm();
                    frmCustomerHistory.Show(this.dockPanel1);
                    break;

                case "续当":
                    RenewPawnForm frmRenewPawn = new RenewPawnForm();
                    frmRenewPawn.Show(this.dockPanel1);
                    break;

                case "部分赎回":
                    PartRedeemPawnForm frmPartRedeemPawn = new PartRedeemPawnForm();
                    frmPartRedeemPawn.Show(this.dockPanel1);
                    break;

                case "赎当":
                    RedeemPawnForm frmRedeemPawn = new RedeemPawnForm();
                    frmRedeemPawn.Show(this.dockPanel1);
                    break;

                case "当品类别设定":
                    SetPawnageClassForm frmSetPawnageClass = new SetPawnageClassForm();
                    frmSetPawnageClass.Show(this.dockPanel1);
                    break;

                case "典当行信息设定":
                    SetCompanyInfoForm frmSetComInfo = new SetCompanyInfoForm();
                    frmSetComInfo.Show(this.dockPanel1);
                    break;

                case "当票查询":
                    SearchPawnTicketForm frmSearchPawnTicket = new SearchPawnTicketForm();
                    frmSearchPawnTicket.Show(this.dockPanel1);
                    break;

                case "分店管理":
                    ManageSubstoreForm frmManageSubstore = new ManageSubstoreForm();
                    frmManageSubstore.Show(this.dockPanel1);
                    break;

                case "删除处理":
                    DeletePawnForm frmDeletePawn = new DeletePawnForm();
                    frmDeletePawn.Show(this.dockPanel1);
                    break;

                case "绝当处理":
                    ClosePawnForm frmClosePawn = new ClosePawnForm();
                    frmClosePawn.Show(this.dockPanel1);
                    break;

                case "冻结处理":
                    FreezePawnForm frmFreezePawn = new FreezePawnForm();
                    frmFreezePawn.Show(this.dockPanel1);
                    break;

                case "清算处理":
                    ClearPawnForm frmClearPawn = new ClearPawnForm();
                    frmClearPawn.Show(this.dockPanel1);
                    break;

                case "权限管理":
                    ManageRoleForm frmManageRole = new ManageRoleForm();
                    frmManageRole.Show(this.dockPanel1);
                    break;

                case "帐户管理":
                    ManageAccountForm frmManageAccount = new ManageAccountForm();
                    frmManageAccount.Show(this.dockPanel1);
                    break;

                case "修改个人信息":
                    EditPersonalAccountForm frmEditPersonalAccount = new EditPersonalAccountForm();
                    frmEditPersonalAccount.Show(this.dockPanel1);
                    break;

                case "资金统计查询":
                    QueryByFinanceForm frmQueryByFinance = new QueryByFinanceForm();
                    frmQueryByFinance.Show(this.dockPanel1);
                    break;

                case "公告内容管理":
                    ManageNewsForm frmManageNews = new ManageNewsForm();
                    frmManageNews.Show(this.dockPanel1);
                    break;

                case "当日业务监控":
                    OperationsOfCurrentDayForm frmOperationOfCurrentDay = new OperationsOfCurrentDayForm();
                    frmOperationOfCurrentDay.Show(this.dockPanel1);
                    break;

                case "当品标准分类统计":
                    QueryByClassForm frmQueryByStandardClass = new QueryByClassForm(0);
                    frmQueryByStandardClass.Show(this.dockPanel1);
                    break;

                case "当品统计分类统计":
                    QueryByClassForm frmQueryByStatisticalClass = new QueryByClassForm(1);
                    frmQueryByStatisticalClass.Show(this.dockPanel1);
                    break;

                case "营收标准分类统计":
                    QueryByTakingForm frmQueryByStandardTaking = new QueryByTakingForm(0);
                    frmQueryByStandardTaking.Show(this.dockPanel1);
                    break;

                case "营收统计分类统计":
                    QueryByTakingForm frmQueryByStatisticalTaking = new QueryByTakingForm(1);
                    frmQueryByStatisticalTaking.Show(this.dockPanel1);
                    break;

                case "股票查询":
                    SearchStockForm frmSearchStock = new SearchStockForm();
                    frmSearchStock.Show(this.dockPanel1);
                    break;

                case "到期房产查询":
                    SearchHouseForm frmSearchHouse = new SearchHouseForm();
                    frmSearchHouse.Show(this.dockPanel1);
                    break;

                case "房产查询":
                    SearchHouseInfoForm frmSearchHouseInfo = new SearchHouseInfoForm();
                    frmSearchHouseInfo.Show(this.dockPanel1);
                    break;

                case "车辆查询":
                    SearchCarInfoForm frmSearchCarInfo = new SearchCarInfoForm();
                    frmSearchCarInfo.Show(this.dockPanel1);
                    break;

                case "黄金查询":
                    SearchGoldForm frmSearchGold = new SearchGoldForm();
                    frmSearchGold.Show(this.dockPanel1);
                    break;

                case "铂金查询":
                    SearchPtForm frmSearchPt = new SearchPtForm();
                    frmSearchPt.Show(this.dockPanel1);
                    break;

                case "打印设定":
                    SetPrintForm frmSetPrint = new SetPrintForm();
                    frmSetPrint.Show(this.dockPanel1);
                    break;

                case "操作查询":
                    SearchOperationForm frmOperationSearch = new SearchOperationForm();
                    frmOperationSearch.Show(this.dockPanel1);
                    break;

                case "续转处理":
                    TransformPawnForm frmTransformPawnForm = new TransformPawnForm();
                    frmTransformPawnForm.Show(this.dockPanel1);
                    break;

                case "当品查询":
                    SearchPawnInfoForm frmSearchPawnInfoForm = new SearchPawnInfoForm();
                    frmSearchPawnInfoForm.Show(this.dockPanel1);
                    break;

                default:
                    MessageBox.Show(this, "该功能尚未实现!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    break;
                }
            }
        }
예제 #2
0
        private void CreateTab(string text)
        {
            if (CheckPermission(text) != DialogResult.OK)
            {
                MessageBox.Show("对不起,该用户没有权限做此操作!", "提示信息");
                return;
            }

            IDockContent content = FindTab(text);

            if (content != null)
            {
                content.DockHandler.Show();
            }
            else
            {
                switch (text)
                {
                case "建当":
                    CreatePawnForm frmCreatePawn = new CreatePawnForm();
                    frmCreatePawn.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "续当":
                    RenewPawnForm frmRenewPawn = new RenewPawnForm();
                    frmRenewPawn.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "赎当":
                    RedeemPawnForm frmRedeemPawn = new RedeemPawnForm();
                    frmRedeemPawn.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "绝当处理":
                    ClosePawnForm frmClosePawn = new ClosePawnForm();
                    frmClosePawn.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "清算处理":
                    ClearPawnForm frmClearPawn = new ClearPawnForm();
                    frmClearPawn.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "资金统计查询":
                    QueryByFinanceForm frmQueryByFinance = new QueryByFinanceForm();
                    frmQueryByFinance.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "当日业务监控":
                    OperationsOfCurrentDayForm frmOperationOfCurrentDay = new OperationsOfCurrentDayForm();
                    frmOperationOfCurrentDay.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "当品标准分类统计":
                    QueryByClassForm frmQueryByStandardClass = new QueryByClassForm(0);
                    frmQueryByStandardClass.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "当品统计分类统计":
                    QueryByClassForm frmQueryByStatisticalClass = new QueryByClassForm(1);
                    frmQueryByStatisticalClass.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "营收标准分类统计":
                    QueryByTakingForm frmQueryByStandardTaking = new QueryByTakingForm(0);
                    frmQueryByStandardTaking.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                case "营收统计分类统计":
                    QueryByTakingForm frmQueryByStatisticalTaking = new QueryByTakingForm(1);
                    frmQueryByStatisticalTaking.Show((DockPanel)MainForm.pCurrentWin.Controls["dockPanel1"]);
                    break;

                default:
                    break;
                }
            }
        }