Example #1
0
        /// <summary>Implements <see cref="ISys_ApplicationRepository.Find"/></summary>
        public Sys_Application Find(Int32 id)
        {
            String          stmtId = "Sys_Application.Find";
            Sys_Application result = SqlMapper.QueryForObject <Sys_Application>(stmtId, id);

            return(result);
        }
 /// <summary>Implements <see cref="ISys_ApplicationService.Delete"/></summary>
 public void Delete(Sys_Application obj)
 {
     if (obj == null)
     {
         throw new ArgumentNullException("obj");
     }
     _repository.Delete(obj);
 }
 /// <summary>Implements <see cref="ISys_ApplicationService.Insert"/></summary>
 public void Insert(Sys_Application obj)
 {
     if (obj == null)
     {
         throw new ArgumentNullException("obj");
     }
     _repository.Insert(obj);
 }
Example #4
0
        /// <summary>Implements <see cref="ISys_ApplicationRepository.Delete"/></summary>
        public void Delete(Sys_Application obj)
        {
            if (obj == null)
            {
                throw new ArgumentNullException("obj");
            }
            String stmtId = "Sys_Application.Delete";

            SqlMapper.Delete(stmtId, obj);
        }
Example #5
0
        /// <summary>Implements <see cref="ISys_ApplicationRepository.Insert"/></summary>
        public void Insert(Sys_Application obj)
        {
            if (obj == null)
            {
                throw new ArgumentNullException("obj");
            }
            String stmtId = "Sys_Application.Insert";

            SqlMapper.Update(stmtId, obj);
        }
Example #6
0
        public Sys_Application FindByName(string applicationName)
        {
            String          stmtId = "Sys_Application.FindByName";
            Sys_Application ap     = new Sys_Application();

            ap.Name = applicationName;
            Sys_Application result = SqlMapper.QueryForObject <Sys_Application>(stmtId, ap);

            return(result);
        }
        private void InsertApplication()
        {
            Sys_Application app = _appRepository.FindByName(ApplicationName);

            if (app == null)
            {
                app             = new Sys_Application();
                app.Name        = ApplicationName;
                app.Description = string.Empty;
                _appRepository.Insert(app);
            }
        }
Example #8
0
        public JsonResult QuickSave(Sys_Application model)
        {
            JsonResult result = new JsonResult();

            if (model.Id == Guid.Empty)
            {
                result.Data = dalSY.Insert(model);
            }
            else
            {
                result.Data = dalSY.Update(model);
            }
            return(result);
        }
        /// <summary>Implements <see cref="ISys_ApplicationService.Find"/></summary>
        public Sys_Application Find(Int32 id)
        {
            Sys_Application result = _repository.Find(id);

            return(result);
        }