public void UpdateSource(tbl_Source tblSource) { try { IGenericDataRepository <tbl_Source> repository = new GenericDataRepository <tbl_Source>(); repository.Update(tblSource); } catch (Exception) { throw; } }
public tbl_Source FindSourceName(String sourceName, int daid) { try { IGenericDataRepository <tbl_Source> repository = new GenericDataRepository <tbl_Source>(); tbl_Source tblSource = repository.GetSingle(s => s.SourceDesc.ToUpper() == sourceName.ToUpper() && s.daId == daid); return(tblSource); } catch (Exception) { throw; } }
public tbl_Source FindSource(int?sourceID) { try { IGenericDataRepository <tbl_Source> repository = new GenericDataRepository <tbl_Source>(); tbl_Source tblSource = repository.GetSingle(s => s.SourceID == sourceID); return(tblSource); } catch (Exception) { throw; } }
public void DeleteSource(SourceViewModel sourceViewModel) { try { tbl_Source tblSource = new tbl_Source(); tblSource.SourceID = sourceViewModel.sourceID; tblSource.daId = sourceViewModel.DAID; tblSource.EntityState = DA.DomainModel.EntityState.Deleted; SourceManager sourceManager = new SourceManager(); sourceManager.DeleteSource(tblSource); } catch (Exception) { throw; } }
public void AddSource(SourceViewModel sourceViewModel) { try { tbl_Source tblSource = new tbl_Source(); tblSource.SourceDesc = sourceViewModel.sourceDesc; tblSource.daId = sourceViewModel.DAID;//1 tblSource.EntityState = DA.DomainModel.EntityState.Added; SourceManager sourceManager = new SourceManager(); sourceManager.AddSource(tblSource); } catch (Exception) { throw; } }
partial void Deletetbl_Source(tbl_Source instance);
partial void Updatetbl_Source(tbl_Source instance);
partial void Inserttbl_Source(tbl_Source instance);