private void tool_SwSaveButtonClicked(object sender, EventArgs e) { var abone = new Abone(); SetFromScreen(abone, groupBox1); AboneService.Instance.AboneInsert(abone); MessageBox.Show(@"Abone Eklendi"); Clear(groupBox1); tool_SwGetButtonClicked(sender, e); }
private void tool_SwUpdateButtonClicked(object sender, EventArgs e) { var abone = new Abone(); SetFromScreen(abone, groupBox1); UnitOfWork.Instance.GetRepository<Abone>().Update(abone); UnitOfWork.Instance.Save(); MessageBox.Show(@"Abone Guncellendi"); Clear(groupBox1); tool_SwGetButtonClicked(sender, e); }
public void AboneInsert(Abone abone) { UnitOfWork.Instance.GetRepository<Abone>().Create(abone); var aboneHesap = new AboneHesap { AboneId = abone.Id, Amount = abone.AboneType.Amount, Description = "Abonelik Bedeli", IslemDate = DateTime.Now, IslemType = Model.Util.IslemType.Borç }; UnitOfWork.Instance.GetRepository<AboneHesap>().Create(aboneHesap); UnitOfWork.Instance.Save(); }