Пример #1
0
 public void UpdateSource(tbl_Source tblSource)
 {
     try
     {
         IGenericDataRepository <tbl_Source> repository = new GenericDataRepository <tbl_Source>();
         repository.Update(tblSource);
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
        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;
            }
        }
Пример #3
0
        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;
            }
        }
Пример #4
0
        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;
            }
        }
Пример #5
0
        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;
            }
        }
Пример #6
0
 partial void Deletetbl_Source(tbl_Source instance);
Пример #7
0
 partial void Updatetbl_Source(tbl_Source instance);
Пример #8
0
 partial void Inserttbl_Source(tbl_Source instance);