/// <summary>
        /// 离开选择操作
        /// </summary>
        public void LeaveOperate()
        {
            LeaveWindow leaveSelect = new LeaveWindow();

            leaveSelect.ShowDialog();
            //判断读者选择的离开方式
            clientobject.EnterOutLogData.EnterOutlog.Flag = Operation.Reader;
            switch (clientobject.EnterOutLogData.FlowControl)
            {
            case ClientOperation.ContinuedTime:                                                         //读者选择续时操作
                clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.ContinuedTime; //设置读者状态为续时
                ContinuedTime();
                break;

            case ClientOperation.Leave:                                                         //读者选择离开操作
                clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.Leave; //设置读者状态为离开
                ReleaseSeat();
                break;

            case ClientOperation.ReSelectSeat:
                ChooseSeat();
                return;                                                                              //如果是重新选座,则结束方法

            case ClientOperation.ShortLeave:                                                         //读者选择暂离操作
                clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.ShortLeave; //设置读者状态为暂离
                ShortLeave();
                break;
            }
        }
        private void buttonLeave_Click(object sender, RoutedEventArgs e)
        {
            LeaveWindow ma = new LeaveWindow();

            ma.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            this.Close();
            ma.ShowDialog();
        }
Exemple #3
0
        /// <summary>
        /// 离开选择操作
        /// </summary>
        public void LeaveOperate()
        {
            string leaveModel = ConfigurationManager.AppSettings["LeaveState"];

            if (string.IsNullOrEmpty(leaveModel) || leaveModel == "0")
            {
                LeaveWindow leaveSelect = new LeaveWindow();
                leaveSelect.ShowDialog();
                //判断读者选择的离开方式
                clientobject.EnterOutLogData.EnterOutlog.Flag = Operation.Reader;
                switch (clientobject.EnterOutLogData.FlowControl)
                {
                case ClientOperation.ContinuedTime:                                                         //读者选择续时操作
                    clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.ContinuedTime; //设置读者状态为续时
                    ContinuedTime();
                    break;

                case ClientOperation.Leave:                                                         //读者选择离开操作
                    clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.Leave; //设置读者状态为离开
                    ReleaseSeat();
                    break;

                case ClientOperation.ShortLeave:                                                         //读者选择暂离操作
                    clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.ShortLeave; //设置读者状态为暂离
                    ShortLeave();
                    break;
                }
            }
            else
            {
                switch (leaveModel)
                {
                case "1":                                                                                //读者选暂离时操作
                    clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.ShortLeave; //设置读者状态为暂离
                    ShortLeave();
                    break;

                case "2":                                                                           //读者选择离开操作
                    clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.Leave; //设置读者状态为离开
                    ReleaseSeat();
                    break;

                case "3":                                                                                   //读者选择续时操作
                    clientobject.EnterOutLogData.EnterOutlog.EnterOutState = EnterOutLogType.ContinuedTime; //设置读者状态为续时
                    ContinuedTime();
                    break;
                }
            }
        }