Exemplo n.º 1
0
        private void btnSearchRide_Click(object sender, RoutedEventArgs e)
        {
            int  id = Int32.Parse(tbReqRideId.Text);
            Ride rd = DatabaseConnectionHandler.GetInstance().Ride.Where(x => x.RideId == id).FirstOrDefault();

            tbNameReRide.Text = rd.RideName;
        }
Exemplo n.º 2
0
        private void btnSeacrhIdResign_Click(object sender, RoutedEventArgs e)
        {
            int id   = Int32.Parse(tbReqResignId.Text);
            var rslt = DatabaseConnectionHandler.GetInstance().RequestResign.Where(x => x.RequestResignId == id).FirstOrDefault();

            tbReason.Text = rslt.ResignReason;
        }
        private void btnPurId_Click(object sender, RoutedEventArgs e)
        {
            int id   = Int32.Parse(tbPurId.Text);
            var rslt = DatabaseConnectionHandler.GetInstance().RequestPurchase.Where(x => x.RequestPurchaseId == id).FirstOrDefault();

            tbReqDet.Text       = rslt.RequestPurchaseDetail;
            dpNeed.SelectedDate = rslt.RequestDateNeed;
        }
        private void btnSearchAAds_Click(object sender, RoutedEventArgs e)
        {
            int id   = Int32.Parse(tbAdsId.Text);
            var rslt = DatabaseConnectionHandler.GetInstance().Advertisement.Where(x => x.AdvertisementId == id).FirstOrDefault();

            tbNameAds.Text   = rslt.AdvertisementName;
            tbDetailAds.Text = rslt.AdvertisementDetail;
        }
Exemplo n.º 5
0
        private void btnAccResign_Click(object sender, RoutedEventArgs e)
        {
            int id = Int32.Parse(tbReqResignId.Text);
            var rr = DatabaseConnectionHandler.GetInstance().RequestResign.Where(x => x.RequestResignId == id).FirstOrDefault();

            rr.ResignStatus = "Accept";
            DatabaseConnectionHandler.GetInstance().SaveChanges();
            MessageBox.Show("Accept Successfully");
        }
        private void btnFundId_Click(object sender, RoutedEventArgs e)
        {
            int id   = Int32.Parse(tbFundId.Text);
            var rslt = DatabaseConnectionHandler.GetInstance().RequestFund.Where(x => x.RequestFundId == id).FirstOrDefault();

            tbFundDet.Text     = rslt.RequestFundDetail;
            tbFundAmount.Text  = rslt.PredictedAmount.ToString();
            tbReasonNoAcc.Text = rslt.RequestReason;
        }
Exemplo n.º 7
0
        private void dataWorkPerformance_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().Employee
                        select new
            {
                EmployeeName = x.EmployeeName,
                EmployeePerformance = x.EmployeePerformance
            }).ToList();

            dataWorkPerformance.ItemsSource = rslt;
        }
Exemplo n.º 8
0
        private void dataRequestResign_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestResign.Where(x => x.ResignStatus.Contains("Wait"))
                        select new
            {
                RequestId = x.RequestResignId,
                ResignStatus = x.ResignStatus
            }).ToList();

            dataRequestResign.ItemsSource = rslt;
        }
        private void dataRequestPermit_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestPermit
                        select new
            {
                RequestPermitId = x.RequestPermitId,
                RequestPermitStatus = x.PermitStatus
            }).ToList();

            dataRequestPermit.ItemsSource = rslt;
        }
Exemplo n.º 10
0
        private void btnSearchReAtt_Click(object sender, RoutedEventArgs e)
        {
            int id   = Int32.Parse(tbReqAttId.Text);
            var rslt = DatabaseConnectionHandler.GetInstance().RequestAttraction.Where(x => x.ReqAttId == id).FirstOrDefault();

            tbNameReAtt.Text            = rslt.ReqAttName;
            tbDescReAtt.Text            = rslt.ReqAttDescription;
            tbHowWorkReAtt.Text         = rslt.ReqAttHowToWork;
            tbReWhoPart.Text            = rslt.ReqAttWhoParticipant;
            dpReDateLaunch.SelectedDate = rslt.ReqAttStartDateLaunch;
        }
Exemplo n.º 11
0
        private void btnLookRide_Click(object sender, RoutedEventArgs e)
        {
            int  id = Int32.Parse(tbRideId.Text);
            Ride rd = DatabaseConnectionHandler.GetInstance().Ride.Where(x => x.RideId == id).FirstOrDefault();

            tbNameRide.Text    = rd.RideName;
            tbDescRide.Text    = rd.RideDescription;
            tbHowWorkRide.Text = rd.RideHowToWork;
            tbSafetyRide.Text  = rd.RideSafetyInformation;
            cbKindRide.Text    = rd.RideKind;
        }
        private void DataRequestResignView_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestResign
                        select new
            {
                ApplyDate = x.AssignDate,
                ResignReason = x.ResignReason,
                ResponStatus = x.ResignStatus
            }).ToList();

            DataRequestResignView.ItemsSource = rslt;
        }
        private void dataAdvertisement_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().Advertisement
                        select new
            {
                AdsId = x.AdvertisementId,
                AdsName = x.AdvertisementName,
                AdsStatus = x.AdvertisementStatus
            }).ToList();

            dataAdvertisement.ItemsSource = rslt;
        }
Exemplo n.º 14
0
        private void dataAttractionForRequest_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().Attraction
                        select new
            {
                AttractionId = x.AttractionId,
                AttractionName = x.AttractionName,
                AttractionStatus = x.AttractionStatus
            }).ToList();

            dataAttractionForRequest.ItemsSource = rslt;
        }
Exemplo n.º 15
0
        private void dataHotelTransactionView_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().HotelTransaction
                        select new
            {
                TransactionId = x.HotelTransactionId,
                TransactionDate = x.HotelTransactionDate,
                Amount = x.Payment
            }).ToList();

            dataHotelTransactionView.ItemsSource = rslt;
        }
        private void dataRequestFund_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestFund.Where(x => x.EmployeeId == LoginHandler.idEmp)
                        select new
            {
                RequestPurchaseId = x.RequestFundId,
                RequestDate = x.RequestFundDate,
                RequestStatus = x.RequestFundStatus
            }).ToList();

            dataRequestFund.ItemsSource = rslt;
        }
        private void dataRequestFund_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestFund.Where(x => x.RequestFundStatus.Contains("Wait"))
                        select new
            {
                requestFundID = x.RequestFundId,
                reqDate = x.RequestFundDate,
                reqStatus = x.RequestFundStatus
            }).ToList();

            dataRequestFund.ItemsSource = rslt;
        }
Exemplo n.º 18
0
        private void dataRequestRide_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestRide.Where(x => x.ReqRideStatus.Contains("Waiting"))
                        select new
            {
                RequestRideId = x.ReqRideId,
                RequestRideName = x.ReqRideName,
                AttractionStatus = x.ReqRideStatus
            }).ToList();

            dataRequestRide.ItemsSource = rslt;
        }
        private void dataReqPur_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestPurchase
                        select new
            {
                ReqId = x.RequestPurchaseId,
                DateNeed = x.RequestDateNeed,
                TimeNeed = x.PurchaseTimeNeed,
                Detail = x.RequestPurchaseDetail
            }).ToList();

            dataReqPur.ItemsSource = rslt;
        }
Exemplo n.º 20
0
        private void dataConsRide_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().Ride.Where(x => x.RideStatus.Contains("wait") || x.RideStatus.Contains("progress"))
                        select new
            {
                RideId = x.RideId,
                RideName = x.RideName,
                RideKind = x.RideKind,
                RideStatus = x.RideStatus
            }).ToList();

            dataConsRide.ItemsSource = rslt;
        }
Exemplo n.º 21
0
        private void dataRide_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().Ride
                        select new
            {
                RideId = x.RideId,
                RideName = x.RideName,
                RideKind = x.RideKind,
                RideStatus = x.RideStatus
            }).ToList();

            dataRide.ItemsSource = rslt;
        }
Exemplo n.º 22
0
        private void dataRestaurantTransactionView_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RestaurantTransaction
                        select new
            {
                TransactionId = x.ResturantTransaction,
                EmployeeName = x.Employee.EmployeeName,
                TransactionDate = x.TransactionDate,
                Amount = x.Payment
            }).ToList();

            dataRestaurantTransactionView.ItemsSource = rslt;
        }
        private void btnSearchAtt_Click(object sender, RoutedEventArgs e)
        {
            int id   = Int32.Parse(tbAttId.Text);
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().Attraction.Where(x => x.AttractionId == id)
                        select new
            {
                x.AttractionName
            }).ToList();

            foreach (var item in rslt)
            {
                lbNameAtt.Content = item.AttractionName;
            }
        }
Exemplo n.º 24
0
        private void dataTicketTransactionView_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().TicketTransaction
                        select new
            {
                TransactionId = x.TicketTransactionId,
                EmployeeName = x.Employee.EmployeeName,
                TicketTransactionDate = x.TicketTransactionDate,
                TicketQuantity = x.TicketQuantity,
                TransactionStatus = x.TicketTransactionStatus
            }).ToList();

            dataTicketTransactionView.ItemsSource = rslt;
        }
        private void DataEmployeeView_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().Employee
                        select new
            {
                Employee_Id = x.EmployeeId,
                Employee_Name = x.EmployeeName,
                Employee_Gender = x.EmployeeGender,
                Employee_DOB = x.EmployeeDOB,
                Employee_Role = x.EmployeeRole,
                Employee_Department = x.EmployeeDepartment.EmployeeDepartmentName
            }).ToList();

            DataEmployeeView.ItemsSource = rslt;
        }
        private void DataRequestPermitView_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestPermit
                        select new
            {
                RequestPermitId = x.RequestPermitId,
                StartDate = x.FromDate,
                ToDate = x.ToDate,
                CategoryPermit = x.Category,
                Reason = x.ReasonPermit,
                ResponStatus = x.PermitStatus
            }).ToList();

            DataRequestPermitView.ItemsSource = rslt;
        }
Exemplo n.º 27
0
        private void btnSearchRide_Click(object sender, RoutedEventArgs e)
        {
            int id   = Int32.Parse(tbReqRideId.Text);
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().RequestRide.Where(x => x.ReqRideId == id)
                        select new
            {
                x.ReqRideName, x.ReqRideDescription
            }).ToList();

            foreach (var item in rslt)
            {
                lbNameRide.Content = item.ReqRideName;
                lbDescRide.Content = item.ReqRideDescription;
            }
        }
        private void DataScheduleMtn_Loaded(object sender, RoutedEventArgs e)
        {
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().MaintenanceSchedule
                        select new
            {
                MaintenanceId = x.MaintenanceScheduleId,
                AttractionId = x.AttractionId,
                AttractionName = x.AttractionName,
                Date = x.MaintenanceDate,
                StartTime = x.MaintenaceStartTime,
                EndTime = x.MaintenanceEndTime
            }).ToList();

            DataScheduleMtn.ItemsSource = rslt;
        }
Exemplo n.º 29
0
        private void btnSearchRide_Click(object sender, RoutedEventArgs e)
        {
            int id   = Int32.Parse(tbRideId.Text);
            var rslt = (from x in DatabaseConnectionHandler.GetInstance().Ride.Where(x => x.RideId == id)
                        select new
            {
                x.RideName, x.RideDescription, x.RideHowToWork,
                x.RideKind, x.RideSafetyInformation
            }).ToList();

            foreach (var item in rslt)
            {
                tbNameRide.Text    = item.RideName;
                tbDescRide.Text    = item.RideDescription;
                tbHowWorkRide.Text = item.RideHowToWork;
                tbSafetyRide.Text  = item.RideSafetyInformation;
                cbKindRide.Text    = item.RideKind;
            }
        }
Exemplo n.º 30
0
        private void btnfinishCons_Click(object sender, RoutedEventArgs e)
        {
            int  id = Int32.Parse(tbReqRideId.Text);
            Ride rd = DatabaseConnectionHandler.GetInstance().Ride.Where(x => x.RideId == id).FirstOrDefault();

            if (rd.RideStatus.Contains("Add"))
            {
                rd.RideStatus = "Active";
            }
            else if (rd.RideStatus.Contains("Upd"))
            {
                rd.RideStatus = "Active";
            }
            else if (rd.RideStatus.Contains("Rem"))
            {
                rd.RideStatus = "Remove";
            }
            DatabaseConnectionHandler.GetInstance().SaveChanges();
            MessageBox.Show("Finish Construction");
        }