private void btnUpdate_Click(object sender, EventArgs e) { if (lbScheduledLessons.Text != null && !string.IsNullOrWhiteSpace(lbScheduledLessons.Text)) { GlobalVariables.PreviousForm = "ScheduledLessonTable"; GlobalVariables.Purpose = "Update"; GlobalVariables.UpdateID = lbScheduledLessons.GetItemText(lbScheduledLessons.SelectedItem); for (int x = 0; x < Schedule_ID.Count(); x++) { if (Convert.ToInt32(lbScheduledLessons.GetItemText(lbScheduledLessons.SelectedItem)) == Schedule_ID[x]) { GlobalVariables.Schedule_StudentID = Convert.ToString(Schedule_StudentID[x]); GlobalVariables.Schedule_TeacherID = Convert.ToString(Schedule_TeacherID[x]); GlobalVariables.Schedule_PurchaseID = Convert.ToString(Schedule_BundleID[x]); GlobalVariables.Schedule_Weeks = Schedule_Weeks[x]; GlobalVariables.Schedule_StartDate = Schedule_StartDate[x].ToString(); GlobalVariables.Schedule_BookedDays = Schedule_BookedDays[x]; GlobalVariables.Schedule_BookedTime = Schedule_BookedTime[x]; GlobalVariables.Schedule_EndDate = Schedule_EndDate[x].ToString(); break; } } frmAddField UpdateRecord = new frmAddField(); UpdateRecord.Show(); this.Hide(); } else { MessageBox.Show("Please select a Scheduled Lesson Record. (Select from Record Display)"); } }
private void btnUpdate_Click(object sender, EventArgs e) { if (lbPurchaseID != null && !string.IsNullOrWhiteSpace(lbPurchaseID.Text)) { for (int x = 0; x < PurchasedLessons_StudentID.Count(); x++) { if (PurchasedLessons_StudentID[x].ToString() == lbStudentID.Text) { GlobalVariables.PreviousForm = "PurchasedLessonBundleTable"; GlobalVariables.Purpose = "Update"; GlobalVariables.UpdateID = lbPurchaseID.GetItemText(lbPurchaseID.SelectedItem); GlobalVariables.Purchase_StudentID = PurchasedLessons_StudentID[x].ToString(); GlobalVariables.Purchase_BundleID = PurchasedLessons_LessonBundleID[x].ToString(); GlobalVariables.Purchase_Date = PurchasedLessons_PaymentDate[x].ToShortDateString(); GlobalVariables.Purchase_Method = PurchasedLessons_Method[x]; GlobalVariables.Purchase_Recieved = PurchasedLessons_Recieved[x].ToString(); GlobalVariables.Purchase_ReceivedDate = PurchsedLessons_RecievedDate[x]; GlobalVariables.Purchase_BundleCosts = PurchasedLessons_BundleCost[x].ToString(); frmAddField Add = new frmAddField(); Add.Show(); this.Hide(); } } } else { MessageBox.Show("Please select a Purchased Lesson Record."); } }
private void button1_Click(object sender, EventArgs e) { // Load Add New Record Form GlobalVariables.PreviousForm = "Calender"; frmAddField AddField = new frmAddField(); AddField.Show(); this.Hide(); }
// ADD RECORD private void button1_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "ScheduledLessonTable"; frmAddField Addscheudle = new frmAddField(); Addscheudle.Show(); this.Hide(); }
private void btnAddPurchase_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "PurchasedLessonBundleTable"; frmAddField AddPurchase = new frmAddField(); AddPurchase.Show(); this.Hide(); }
// ADD NEW RECORD private void btnAdd_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "TeacherTable"; frmAddField AddTeacher = new frmAddField(); AddTeacher.Show(); this.Hide(); }
// ADD RECORD private void btnAddRoom_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "RoomTable"; GlobalVariables.Purpose = "Add"; frmAddField AddRoom = new frmAddField(); AddRoom.Show(); this.Hide(); }
// ADD NEW INSTRUMENT private void btnAddGrade_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "InstrumentTable"; GlobalVariables.Purpose = "Add"; frmAddField AddField = new frmAddField(); AddField.Show(); this.Hide(); }
// ADD NEW RECORD private void button1_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "LessonBundleTable"; GlobalVariables.Purpose = "Add"; frmAddField Addscheudle = new frmAddField(); Addscheudle.Show(); this.Hide(); }
private void btnUpdate_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "RoomTable"; GlobalVariables.Purpose = "Update"; GlobalVariables.UpdateID = lbRoomID.GetItemText(lbRoomID.SelectedItem); GlobalVariables.Room_Type = lbRoomType.GetItemText(lbRoomType.SelectedItem); GlobalVariables.Room_Specialisation = lbRoomSpecialisation.GetItemText(lbRoomSpecialisation.SelectedItem); frmAddField UpdateRecord = new frmAddField(); UpdateRecord.Show(); this.Hide(); }
// UPDATE RECORD private void btnUpdate_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "GradeTable"; GlobalVariables.Purpose = "Update"; GlobalVariables.UpdateID = lbGradeID.GetItemText(lbGradeID.SelectedItem); GlobalVariables.Grade_Level = lbGradeLevel.GetItemText(lbGradeLevel.SelectedItem); GlobalVariables.Grade_Fee = lbGradeFee.GetItemText(lbGradeFee.SelectedItem); frmAddField UpdateRecord = new frmAddField(); UpdateRecord.Show(); this.Hide(); }
private void btnUpdate_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "InstrumentTable"; GlobalVariables.Purpose = "Update"; GlobalVariables.UpdateID = lbInstrumentID.GetItemText(lbInstrumentID.SelectedItem); GlobalVariables.Instrument_Type = lbInstrumentType.GetItemText(lbInstrumentType.SelectedItem); GlobalVariables.Instrument_Name = lbInstrumentName.GetItemText(lbInstrumentName.SelectedItem); GlobalVariables.Instrument_Quantity = lbQuantity.GetItemText(lbQuantity.SelectedItem); frmAddField UpdateRecord = new frmAddField(); UpdateRecord.Show(); this.Hide(); }
private void btnUpdate_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "LessonBundleTable"; GlobalVariables.Purpose = "Update"; GlobalVariables.UpdateID = lbLessonBundleID.GetItemText(lbLessonBundleID.SelectedItem); GlobalVariables.Bundle_Name = lbLessonBundleName.GetItemText(lbLessonBundleName.SelectedItem); GlobalVariables.Bundle_Cost = lbBundleCost.GetItemText(lbBundleCost.SelectedItem); GlobalVariables.Bundle_Discount = lbDiscount.GetItemText(lbDiscount.SelectedItem); frmAddField UpdateRecord = new frmAddField(); UpdateRecord.Show(); this.Hide(); }
private void btnUpdate_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "TeacherTable"; GlobalVariables.Purpose = "Update"; GlobalVariables.UpdateID = lbTeacherID.GetItemText(lbTeacherID.SelectedValue); GlobalVariables.Teacher_FirstName = lbFirstName.GetItemText(lbFirstName.SelectedItem); GlobalVariables.Teacher_Surname = lbSurname.GetItemText(lbSurname.SelectedItem); GlobalVariables.Teacher_Address = lbAddress.GetItemText(lbAddress.SelectedItem); GlobalVariables.Teacher_Town = lbTown.GetItemText(lbTown.SelectedItem); GlobalVariables.Teacher_PostCode = lbPostCode.GetItemText(lbPostCode.SelectedItem); GlobalVariables.Teacher_ContactNumber = lbContactNum.GetItemText(lbContactNum.SelectedItem); GlobalVariables.Teacher_Email = lbEmail.GetItemText(lbEmail.SelectedItem); GlobalVariables.Teacher_Specialisation = lbSpecialisation.GetItemText(lbSpecialisation.SelectedItem); GlobalVariables.Teacher_RoomID = lbRoomID.GetItemText(lbRoomID.SelectedItem); frmAddField UpdateRecord = new frmAddField(); UpdateRecord.Show(); this.Hide(); }
private void btnUpdate_Click(object sender, EventArgs e) { GlobalVariables.PreviousForm = "StudentTable"; GlobalVariables.Purpose = "Update"; GlobalVariables.UpdateID = lbStudentID.GetItemText(lbStudentID.SelectedItem); GlobalVariables.Student_FirstName = lbFirstName.GetItemText(lbFirstName.SelectedItem); GlobalVariables.Student_OtherNames = lbOtherNames.GetItemText(lbOtherNames.SelectedItem); GlobalVariables.Student_Surname = lbSurname.GetItemText(lbSurname.SelectedItem); GlobalVariables.Student_DOB = lbDOB.GetItemText(lbDOB.SelectedItem); GlobalVariables.Student_Address = lbAddress.GetItemText(lbAddress.SelectedItem); GlobalVariables.Student_Town = lbTown.GetItemText(lbTown.SelectedItem); GlobalVariables.Student_PostCode = lbPostCode.GetItemText(lbPostCode.SelectedItem); GlobalVariables.Student_ContactNumber = lbContactNum.GetItemText(lbContactNum.SelectedItem); GlobalVariables.Student_Email = lbEmail.GetItemText(lbEmail.SelectedItem); GlobalVariables.Student_GradeID = lbGradeID.GetItemText(lbGradeID.SelectedItem); GlobalVariables.Student_InstrumentID = lbInstrumentID.GetItemText(lbInstrumentID.SelectedItem); GlobalVariables.Student_PaymentFee = lbTuition.GetItemText(lbTuition.SelectedItem); frmAddField UpdateRecord = new frmAddField(); UpdateRecord.Show(); this.Hide(); }