Ejemplo n.º 1
0
        private void SearchByBloodGroupsButton_Click(object sender, RoutedEventArgs e)
        {
            SearchBGBtn.Focusable = false;
            RequestList requestList = new RequestList();

            requestList.ShowDialog();
        }
Ejemplo n.º 2
0
        private void btn_Reject_Click(object sender, RoutedEventArgs e)
        {
            var DC       = new BloodBankDBDataContext();
            var requests = DC.BloodRequests.First(x => x.Id == request.Id);

            requests.Status = "REJECTED";
            DC.SubmitChanges();
            RequestList requestList = new RequestList();

            requestList.ShowDialog();
        }
Ejemplo n.º 3
0
 private void btn_Approve_Click(object sender, RoutedEventArgs e)
 {
     if (dtp_date.SelectedDate == null || dtp_date.SelectedDate < DateTime.Now)
     {
         MessageBox.Show("Please Enter Valid Date");
     }
     else
     {
         int donorId = availabledonors[ddl_donors.SelectedIndex].Id;
         var DC      = new BloodBankDBDataContext();
         var donor   = DC.Donors.First(x => x.Id == donorId);
         donor.Date = dtp_date.SelectedDate;
         var requests = DC.BloodRequests.First(x => x.Id == request.Id);
         requests.Status    = "APPROVED";
         requests.DonorId   = donor.Id;
         requests.DonarDate = dtp_date.SelectedDate;
         DC.SubmitChanges();
         RequestList requestList = new RequestList();
         requestList.ShowDialog();
     }
 }