Example #1
0
 private void UpdateButton_Click(object sender, EventArgs e)
 {
     try
     {
         for (int bkRecordCounter = 0; bkRecordCounter < viewBookingDataGridView.Rows.Count; bkRecordCounter++)
         {
             if (viewBookingDataGridView.Rows[bkRecordCounter].Selected == true && viewBookingDataGridView.Rows[bkRecordCounter].Cells["BookingIDColumn"].Value != null)
             {
                 COrderManager tempOrderManager = new COrderManager();
                 Int64 tempBookingID = Int64.Parse(viewBookingDataGridView.Rows[bkRecordCounter].Cells["BookingIDColumn"].Value.ToString());
                 CResult tempResult = tempOrderManager.GetBookingInfoByID(tempBookingID);
                 if (tempResult.IsSuccess)
                 {
                     CBookingInfoForm tempTransferTableForm = new CBookingInfoForm("Update", (CBooking)tempResult.Data);
                     tempTransferTableForm.Show();
                     CFormManager.Forms.Push(this);
                     this.Hide();
                     Updated = true;
                 }
                 break;
             }
         }
     }
     catch (Exception ex)
     {
     }
 }