public Education_training SearchEducation(int id) { Education_TableSearchTableAdapter obj = new Education_TableSearchTableAdapter(); int row = Convert.ToInt32(obj.ScalarQuery()); if (row > 0) { DataTable dt = obj.SearchQuery(id); Education_training edu = new Education_training(); edu.LevelOfEducation = dt.Rows[0]["LevelOfEducation"].ToString(); edu.DegreeTitle = dt.Rows[0]["DegreeTitle"].ToString(); edu.Group = dt.Rows[0]["Group"].ToString(); edu.InstituteName = dt.Rows[0]["InstituteName"].ToString(); edu.Achievement = dt.Rows[0]["Achievement"].ToString(); edu.Result = dt.Rows[0]["Result"].ToString(); edu.YearOfoPassing = dt.Rows[0]["YearOfoPassing"].ToString(); edu.Duration = dt.Rows[0]["Duration"].ToString(); return(edu); } else { Education_training edu = new Education_training(); edu.LevelOfEducation = null; edu.DegreeTitle = null; edu.Group = null; edu.InstituteName = null; edu.Achievement = null; edu.Result = null; edu.YearOfoPassing = null; edu.Duration = null; return(edu); } }
public string UpdateEducation(Education_training ed, int id) { Education_Table1TableAdapter obj = new Education_Table1TableAdapter(); int row = obj.UpdateQuery(ed.LevelOfEducation, ed.DegreeTitle, ed.Group, ed.InstituteName, ed.Achievement, ed.Result, ed.YearOfoPassing, ed.Duration, id); if (row > 0) { return("success"); } return("failed"); }
protected void saveEducationButton_Click(object sender, EventArgs e) { Education_training education = new Education_training(); Education_trainingBLL edu = new Education_trainingBLL(); education.LevelOfEducation = levelofeducation.Value; education.DegreeTitle = degreetitle.Value; education.Group = major_group.Value; education.InstituteName = institutename.Value; education.Achievement = achivement.Value; education.Result = result.Value; education.YearOfoPassing = yearofpassing.Value; education.Duration = duration.Value; edu.SaveEducation(education); }
public void searchEducation() { Education_training education = new Education_training(); Education_trainingBLL edu = new Education_trainingBLL(); int id = 2; education = edu.SearchEducation(id); levelofeducation.Value = education.LevelOfEducation; degreetitle.Value = education.DegreeTitle; major_group.Value = education.Group; institutename.Value = education.InstituteName; achivement.Value = education.Achievement; result.Value = education.Result; yearofpassing.Value = education.YearOfoPassing; duration.Value = education.Duration; }
public Employment_History SearchEmployment(int id) { EmploymentHistoryTableAdapter em = new EmploymentHistoryTableAdapter(); EmploymentHistorySearchTableAdapter adapter = new EmploymentHistorySearchTableAdapter(); Employment_History employment = new Employment_History(); int row = Convert.ToInt32(em.ScalarQuery()); if (row > 0) { DataTable dt = adapter.SearchQuery(id); employment.CompanyName = dt.Rows[0]["CompanyName"].ToString(); employment.CompanyBusiness = dt.Rows[0]["CompanyBusiness"].ToString(); employment.Designation = dt.Rows[0]["Designation"].ToString(); employment.Department = dt.Rows[0]["Department"].ToString(); employment.AreaOfExperience = dt.Rows[0]["AreaofExperiences"].ToString(); employment.Responsibilities = dt.Rows[0]["Responsibilities"].ToString(); employment.CompanyLocation = dt.Rows[0]["CompanyLocation"].ToString(); employment.EmploymentPeriod = dt.Rows[0]["EmploymentPeriod"].ToString(); return(employment); } else { Education_training edu = new Education_training(); edu.LevelOfEducation = null; edu.DegreeTitle = null; edu.Group = null; edu.InstituteName = null; edu.Achievement = null; edu.Result = null; edu.YearOfoPassing = null; edu.Duration = null; return(employment); } }