private void lkpEdtClassInstant_EditValueChanged(object sender, System.EventArgs e) { int nClassInstanceID = ACMS.Convert.ToInt32(lkpEdtClassInstant.EditValue); ACMSDAL.TblClassInstance clsInstance = new ACMSDAL.TblClassInstance(); clsInstance.NClassInstanceID = nClassInstanceID; clsInstance.SelectOne(); txtEdtStartTime.Text = clsInstance.DtStartTime.Value.ToShortTimeString(); txtEdtEndTime.Text = clsInstance.DtEndTime.Value.ToShortTimeString(); }
public FormNewNormalClassReservation(int nClassInstanceID, string strMembershipID, ACMSLogic.ClassAttendance classAttendance) { // // Required for Windows Form Designer support // InitializeComponent(); myNClassInstanceID = nClassInstanceID; myClassAttendance = classAttendance; myClassReservationTable = myClassAttendance.ViewReservation(myNClassInstanceID); if (myClassReservationTable != null && myClassReservationTable.Rows.Count > 0) { GridControl19.DataSource = myClassReservationTable; DataRow[] uobReservations = myClassReservationTable.Select("fUOBBooking = 1", "", DataViewRowState.CurrentRows); textEdit3.Text = uobReservations.Length.ToString(); DataRow[] normalReservations = myClassReservationTable.Select("fUOBBooking = 0", "", DataViewRowState.CurrentRows); textEdit2.Text = normalReservations.Length.ToString(); textEdit4.Text = myClassReservationTable.Rows.Count.ToString(); } ucMemberID1.StrBranchCode = ACMSLogic.User.BranchCode; ucMemberID1.EditValueChanged += new ACMSLogic.Common.EditValueChangedDelegate(UcMemberEditValueChanged); ACMSDAL.TblClassInstance classInstance = new ACMSDAL.TblClassInstance(); classInstance.NClassInstanceID = myNClassInstanceID; DataTable table = classInstance.SelectOne(); if (table == null || table.Rows.Count == 0) { throw new Exception("Failed to reserve the non exist class."); } textEdit1.Text = ACMS.Convert.ToInt32(classInstance.NMaxNo).ToString(); Init(); myMemberID = strMembershipID; // // TODO: Add any constructor code after InitializeComponent call // }
public FormNewNormalClassReservation(int nClassInstanceID, string strMembershipID, ACMSLogic.ClassAttendance classAttendance) { // // Required for Windows Form Designer support // InitializeComponent(); myNClassInstanceID = nClassInstanceID; myClassAttendance = classAttendance; myClassReservationTable = myClassAttendance.ViewReservation(myNClassInstanceID); if (myClassReservationTable != null && myClassReservationTable.Rows.Count > 0) { GridControl19.DataSource = myClassReservationTable; DataRow[] uobReservations = myClassReservationTable.Select("fUOBBooking = 1", "", DataViewRowState.CurrentRows); textEdit3.Text = uobReservations.Length.ToString(); DataRow[] normalReservations = myClassReservationTable.Select("fUOBBooking = 0", "", DataViewRowState.CurrentRows); textEdit2.Text = normalReservations.Length.ToString(); textEdit4.Text = myClassReservationTable.Rows.Count.ToString(); } ucMemberID1.StrBranchCode = ACMSLogic.User.BranchCode; ucMemberID1.EditValueChanged += new ACMSLogic.Common.EditValueChangedDelegate(UcMemberEditValueChanged); ACMSDAL.TblClassInstance classInstance = new ACMSDAL.TblClassInstance(); classInstance.NClassInstanceID= myNClassInstanceID; DataTable table = classInstance.SelectOne(); if (table == null || table.Rows.Count == 0) throw new Exception("Failed to reserve the non exist class."); textEdit1.Text = ACMS.Convert.ToInt32(classInstance.NMaxNo).ToString(); Init(); myMemberID = strMembershipID; // // TODO: Add any constructor code after InitializeComponent call // }