public Engineer(string firstName, string lastName, DateTime age, float currPay, string ssn, DegreeName degree) : base(firstName, lastName, age, currPay, ssn) { // This property is defined by the Engineer class. HighestDegree = degree; }
public void Update() { string strsql = "update Degree set " + "DegreeName= '" + DegreeName.Replace("'", "''") + "', " + "Status= '" + Status.Replace("'", "''") + "' " + " where ID =" + Id; SqlConnection ObjConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["MyJobPortal"].ConnectionString); ObjConnection.Open(); SqlCommand ObjCommand = new SqlCommand(strsql, ObjConnection); ObjCommand.ExecuteNonQuery(); ObjConnection.Dispose(); ObjCommand.Dispose(); }
internal void AddNewEducation() { // Populate the Excel Sheet GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Profile"); Thread.Sleep(1000); // Click the Education tab EducationTab.Click(); // Click the Add New button Thread.Sleep(1000); EducationNewButton.Click(); // Input the College/University Name field with valid characers InstituteName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "InstituteName")); // Input the Country of College/University field valid characers CountryName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Country")); // Input the Title field valid characers TitleName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title")); // Input the Degree field valid characers DegreeName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree")); // Input the Year of graduation field valid characers GraduationYear.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "GraduationYear")); Thread.Sleep(500); // Click the Add button EducationAddButton.Click(); Base.test.Log(LogStatus.Info, "Education has been added"); Thread.Sleep(500); // Verify if add the new Education successfully IWebElement actualtext = GlobalDefinitions.driver.FindElement(By.XPath("//div[contains(@class,'ns-type-success')]")); Assert.That(actualtext.Text, Is.EqualTo("Education has been added")); }
public static object SpareAddPropConvert(object obj, int id) { if (id == 1) { if (obj is int) { return((DegreeName)obj); } else if (obj is string) { string s = (string)obj; DegreeName value; if (DegreeName.TryParse(s, out value)) { return(value); } } } // Not a valid value return(null); }