示例#1
0
        /// <summary>
        /// action事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmWork_ActionButtonPress(object sender, ActionButtonPressEventArgs e)
        {
            try
            {
                switch (e.Index)
                {
                //创建请假
                case 0:
                    Leave.frmLeaveCreate frmLeaveCreate = new Leave.frmLeaveCreate();
                    Show(frmLeaveCreate);
                    break;

                //创建消费记录
                case 1:
                    RB.frmRBRows frmRBRows = new RB.frmRBRows();
                    Show(frmRBRows);
                    break;

                //创建报销
                case 2:
                    RB.frmRBCreate frmRBCreate = new RB.frmRBCreate();
                    Show(frmRBCreate);
                    break;
                }
            }
            catch (Exception ex)
            {
                Toast(ex.Message, ToastLength.SHORT);
            }
        }
示例#2
0
        /// <summary>
        /// 菜单点击事件方法
        /// </summary>
        /// <param name="id"></param>
        private void MenuItem(string id)
        {
            if (MenuGroupDict.ContainsKey(id) == true)
            {
                //显示当前菜单的二级菜单
                this.iconMenuData.ShowDialogMenu(MenuGroupDict[id]);
            }
            else
            {
                switch (id)
                {
                //创建请假
                case "Leave":
                    Leave.frmLeaveCreate frmLeaveCreate = new Leave.frmLeaveCreate();
                    Show(frmLeaveCreate);
                    break;

                //创建报销
                case "Reimbursement":
                    RB.frmRBCreate frmRBCreate = new RB.frmRBCreate();
                    Show(frmRBCreate);
                    break;

                //创建消费记录
                case "RB_Rows":
                    RB.frmRBRows frmRBRows = new RB.frmRBRows();
                    Show(frmRBRows);
                    break;

                //创建消费记录模板
                case "RB_RType_Template":
                    RB.frmRTypeTemplate frmRTypeTemplate = new RB.frmRTypeTemplate();
                    Show(frmRTypeTemplate);
                    break;

                //创建部门
                case "Department":
                    Department.frmDepartment frmDepartment = new Department.frmDepartment();
                    Show(frmDepartment);
                    break;

                //创建成本中心
                case "CostCenter":
                    CostCenter.frmCostCenter frmCostCenter = new CostCenter.frmCostCenter();
                    Show(frmCostCenter);
                    break;

                //创建成本中心模板
                case "CC_Type_Template":
                    CostCenter.frmCostTemplet frmCostTemplet = new CostCenter.frmCostTemplet();
                    Show(frmCostTemplet);
                    break;

                //考勤管理模板
                case "AttendanceManagement":
                    Attendance.frmAttendanceManager frmAttendanceManager = new Attendance.frmAttendanceManager();
                    Show(frmAttendanceManager);
                    break;

                //考勤
                case "AttendanceInfo":
                    Attendance.frmAttendanceMain frmAttendanceMain = new Attendance.frmAttendanceMain();
                    frmAttendanceMain.enter = (int)Enum.Parse(typeof(ATMainState), ATMainState.考勤签到.ToString());
                    Show(frmAttendanceMain);
                    break;

                //我的考勤历史
                case "MyAttendanceHistory":
                    Attendance.frmAttendanceStatSelfDay frmAttendanceStatSelfDay = new Attendance.frmAttendanceStatSelfDay();
                    Show(frmAttendanceStatSelfDay);
                    break;

                //考勤统计
                case "AttendanceStatistics":
                    Attendance.frmAttendanceStatistics frmAttendanceStatistics = new Attendance.frmAttendanceStatistics();
                    Show(frmAttendanceStatistics);
                    break;
                }
            }
        }