private void LoadData() { BenefitDAO d = new BenefitDAO(); DataSet set = d.GetAllBenefit(); tabData = set.Tables[0]; gridCtrl.DataSource = tabData; }
public void AddBenefit_Test() { BenefitBean b = new BenefitBean(); b.Level = "Cc"; b.BaseSalary = 200; Assert.IsTrue(dao.AddBenefit(b) == ReturnStatus.OK); DataSet set = dao.GetAllBenefit(); Assert.IsTrue(set.Tables.Count > 0); DataRow[] matches = set.Tables[0].Select(""); Assert.IsTrue(matches.Length == 1); }
private void LoadBaseInfo() { PostDAO d = new PostDAO(); DataSet set = d.GetAllPost(); tabPost = set.Tables[0]; PerformanceDAO ado = new PerformanceDAO(); set = ado.GetAllPerformance(); tabPerformance = set.Tables[0]; BenefitDAO bd = new BenefitDAO(); set = bd.GetAllBenefit(); tabBenefit = set.Tables[0]; }
private void LoadBaseInfo() { PostDAO d = new PostDAO(); DataSet set = d.GetAllPost(); tabPost = set.Tables[0]; repositoryItemLookUpEditPost.DataSource = tabPost; PerformanceDAO ado = new PerformanceDAO(); set = ado.GetAllPerformance(); tabPerformance = set.Tables[0]; repositoryItemLookUpEditPerformance.DataSource = tabPerformance; BenefitDAO bd = new BenefitDAO(); set = bd.GetAllBenefit(); tabBenefit = set.Tables[0]; repositoryItemLookUpEditBenefit.DataSource = tabBenefit; //repositoryItemComboBoxPost.Items.Clear(); //PostDAO d = new PostDAO(); //DataSet set = d.GetAllPost(); //tabPost = set.Tables[0]; //foreach (DataRow r in tabPost.Rows) //{ // repositoryItemComboBoxPost.Items.Add(r["Level"].ToString()); //} //repositoryItemComboBoxPerformance.Items.Clear(); //PerformanceDAO ado = new PerformanceDAO(); //set = ado.GetAllPerformance(); //tabPerformance = set.Tables[0]; //foreach (DataRow r in tabPerformance.Rows) //{ // repositoryItemComboBoxPerformance.Items.Add(r["Level"].ToString()); //} //repositoryItemComboBoxBenefit.Items.Clear(); //BenefitDAO bd = new BenefitDAO(); //set = bd.GetAllBenefit(); //tabBenefit = set.Tables[0]; //foreach (DataRow r in tabBenefit.Rows) //{ // repositoryItemComboBoxBenefit.Items.Add(r["Level"].ToString()); //} }