Esempio n. 1
0
 public void UpdateSource(tbl_Source tblSource)
 {
     try
     {
         IGenericDataRepository <tbl_Source> repository = new GenericDataRepository <tbl_Source>();
         repository.Update(tblSource);
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 6
0
 partial void Deletetbl_Source(tbl_Source instance);
Esempio n. 7
0
 partial void Updatetbl_Source(tbl_Source instance);
Esempio n. 8
0
 partial void Inserttbl_Source(tbl_Source instance);