private void button1_Click(object sender, EventArgs e) { IList <Outlet> outletList = importRepo.CheckIfExistRecord(outletRepo.GetAll(), importRepo.dataGridToObjectList(dataGridView1)); foreach (Outlet outlet in outletList) { outletRepo.Save(outlet); } }
public void AddTest() { var outlet = new Outlet { slsmCode = "slsmtest", outlCode = "outlet001", outlName = "outletTestName", outlAddress = "outlAddressNo.002020", outlRoute = "F01", outlStat = true //outletType = "P & D" }; var result = m_outlet.Save(outlet); Assert.IsTrue(result != 0); }
protected override void button2_Click(object sender, EventArgs e) { Outlet outlet = (Outlet)outletBindingSource.Current; if (outlet == null) { return; } if (isAddNew) { outletRepository.Save(outlet); Listener.Ok(this, true, outlet); } else { outletRepository.Update(outlet); } CekKondisi(FormCondition.Ready); }