private void StudentID_Click(object sender, EventArgs e) { if (StudentID.Text.Equals("Student ID")) { StudentID.Clear(); } }
public virtual string AnyIdentifiableTag(int row = -1) { if (!UserName.NullOrEmpty()) { return(UserName); } if (!FirstName.NullOrEmpty()) { if (!LastName.NullOrEmpty()) { return(FirstName + " " + LastName); } else { return(FirstName); } } if (!LastName.NullOrEmpty()) { return(LastName); } if (!StudentID.NullOrEmpty()) { return(StudentID); } if (row >= 0) { return($"on row {row}"); } return("Unidentifiable student"); }
public override string ToString() { return("ID: " + StudentID.ToString() + ", FirstName: " + StudentFirstName + ", LastName: " + StudentLastName + ", AverageGrade: " + StudentAverageGrade.ToString()); }
public string DisplayStudentInfo(int spaces) { int n1 = StudentName.Length + spaces; int n2 = StudentID.Length + spaces; int n3 = CalcLetterGrade().Length + spaces; return(StudentName.PadRight(n1) + StudentID.PadRight(n2) + CalcLetterGrade().PadRight(n3)); }
public void Displayselecteddata(Hashtable hashtable, object objsender) { ReportControl rpt = (ReportControl)objsender; if (rpt.ID == "SchoolwiseStudentGenderGrid") { GenderwiseReport1.Visible = true; GenderwiseReport2.Visible = true; GenderwiseReport3.Visible = false; lblTitleFirst.Visible = true; lblTitleSecond.Visible = true; lblTitleThird.Visible = false; btnBack.Visible = true; SchoolwiseStudentGenderGrid.Visible = false; BMSwiseStudentGender.Visible = true; BMSwiseStudentList.Visible = false; this.AcademicYear = hashtable["AcademicYear"].ToString(); lblYearValueSecond.Text = this.AcademicYear; lblSchoolValueSecond.Text = ddlSchool.SelectedItem.Text; BindBoardDropdown(ddlBoardSecond); CurrentReport = "BMSwise Student Gender"; StageTwoCalling(); } else if (rpt.ID == "BMSwiseStudentGender") { GenderwiseReport1.Visible = true; GenderwiseReport2.Visible = false; GenderwiseReport3.Visible = true; lblTitleFirst.Visible = true; lblTitleSecond.Visible = false; lblTitleThird.Visible = true; SchoolwiseStudentGenderGrid.Visible = false; BMSwiseStudentGender.Visible = false; BMSwiseStudentList.Visible = true; btnBack.Visible = true; lblYearValueThird.Text = this.AcademicYear; lblSchoolValueThird.Text = ddlSchool.SelectedItem.Text; lblBMSValueThird.Text = hashtable["BMS"].ToString(); this.BMSID = Convert.ToInt32(hashtable["BMSID"].ToString()); lblDivisionValueThird.Text = hashtable["Division"].ToString(); this.DivisionID = Convert.ToInt32(hashtable["DivisionID"].ToString()); StageThirdCalling(); BMSwiseStudentList.Visible = true; } else if (rpt.ID == "BMSwiseStudentList") { std.Visible = true; this.StudentID = Convert.ToInt32(hashtable["StudentID"].ToString()); Session["ReportYear"] = this.AcademicYear; std.BindStudentDetails(StudentID.ToString()); mpStudent.Show(); } }
public void ResetAddStudentControl() { StudentID.Clear(); LastName.Clear(); FirstName.Clear(); Number.Clear(); PhoneType.SelectedIndex = -1; StudentType.SelectedIndex = -1; Country.Clear(); City.Clear(); ZipCode.Clear(); StreetAdress.Clear(); Gender.Clear(); }
private void StudentID_Validating(object sender, CancelEventArgs e) { { var text = (sender as TextBox).Text; if (String.IsNullOrEmpty(text)) { e.Cancel = true; StudentID.Focus(); errorProvider3.SetError(StudentID, $"Give Your ID!"); } else { e.Cancel = false; errorProvider3.SetError(StudentID, ""); } } }
public override bool Equals(System.Object obj) { if (obj == null) { return(false); } Student s = obj as Student; if (StudentID.Equals(s.StudentID)) { return(true); } return(false); }
public override bool Equals(object obj) { var item = obj as Enrollment; if (item == null) { return(false); } if (CourseID.Equals(item.CourseID) && StudentID.Equals(item.StudentID) && date.Equals(item.date)) { return(true); } return(false); }
/// <summary> /// Determines whether the specified object is equal to the current object. /// </summary> /// <param name="obj"> The object to compare with the current object.</param> /// <returns></returns> public override bool Equals(object obj) { if (obj == null) { return(false); } SessionResult res = obj as SessionResult; if (res == null) { return(false); } return(ID.Equals(res.ID) && StudentID.Equals(res.StudentID) && ExamID.Equals(res.ExamID) && Grade.Equals(res.Grade)); }
/// <summary> /// Add row into the StudentTable /// </summary> /// <param name="sender"></param> private void AddRowMethod(object sender) { // command that control the connection and table, needed to be initialize every time developer uses command OleDbCommand cmd = new OleDbCommand(); if (theConnection.State != ConnectionState.Open) { theConnection.Open(); } cmd.Connection = theConnection; if (!StudentID.Equals("")) { if (!StudentGenderOption.Equals("")) { if (IsIDEnabled) { cmd.CommandText = "INSERT INTO " + TABLENAME + " (ID, StudentName, Gender, Contact, Address) values (" + StudentID + ",'" + StudentName + "','" + StudentGenderOption + "','" + StudentContact + "','" + StudentAddress + "')"; cmd.ExecuteNonQuery(); BindGrid(); MessageBox.Show("Student information added successfully!"); RemoveAllInfo(); } else // IsIDEnabled is false only when in Edit mode => Update the value to the selected row { cmd.CommandText = "UPDATE " + TABLENAME + " SET StudentName='" + StudentName + "', Gender='" + StudentGenderOption + "', Contact=" + StudentContact + ", Address='" + StudentAddress + "' where ID=" + StudentID; cmd.ExecuteNonQuery(); BindGrid(); MessageBox.Show("Student information updated successfully!"); AddButtonContent = "Add"; } } else // { MessageBox.Show("Please select gender!"); } } else { MessageBox.Show("Please enter student ID"); } }
public virtual List <ErrorType> GetErrors() { List <ErrorType> list = new List <ErrorType>(); if (FirstName.NullOrEmpty()) { list.Add(ErrorType.FirstName); } if (LastName.NullOrEmpty()) { list.Add(ErrorType.LastName); } if (UserName.NullOrEmpty()) { list.Add(ErrorType.UserName); } if (StudentID.NullOrEmpty()) { list.Add(ErrorType.StudentID); } return(list); }
public override string ToString() { // return "[" + StudentID.ToString() + "]" + Name + " " + Surname; return(StudentID.ToString()); }
public override int GetHashCode() { Console.WriteLine("I am not getting clled"); return(StudentID.GetHashCode()); }
public new bool Find(Int32 OrderID) { this.ID = ""; if (StudentID == 0) { return(false); } //MessageBox.Show("Select * From Product Where ProductID='" + ProductID + "'"); DataRow rProduct = this.oMySql.GetDataRow("Select * From Student Where StudentID='" + StudentID.ToString() + "'", "Student"); if (rProduct == null) { return(false); } this.ID = rProduct["CompanyID"].ToString(); this.TeacherID = (Int32)rProduct["TeacherID"]; return(true); }
public async Task<Student> Get(StudentID id) { return new Student() { ID = id }; }
public override string ToString() { return(String.Format("{0} {1} ({2})", FirstName, LastName, StudentID.ToString())); }
public override string ToString() { return($"{StudentID.LJ(8)}{FirstLast().LJ(20)}{GradeLevel.RJ(4)}"); }
private void StudentID_Click(object sender, EventArgs e) { StudentID.Clear(); }
public override string ToString() { string application = StudentID.ToString() + "/n" + VisitorName + "/n" + CallAtTime.ToString(); return(application); }
/// <summary> /// Get a hash code for the current object. /// </summary> /// <returns></returns> public override int GetHashCode() { return(ID.GetHashCode() * 2 - StudentID.GetHashCode() - Grade.GetHashCode()); }
public string toString() { return(StudentID.ToString() + "," + FirstName.ToString() + "," + LastName.ToString() + "," + FavoriteColor.ToString()); }
/// <summary> /// Checks that all data is valid for the student /// </summary> /// <returns>Returns true if everything is okay, false if there is an error.</returns> public virtual bool ResolveErrors() { return(!FirstName.NullOrEmpty() && !LastName.NullOrEmpty() && !StudentID.NullOrEmpty() && !UserName.NullOrEmpty()); }
public override int GetHashCode() { return(StudentID.GetHashCode()); }