예제 #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);
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
            }
        }
예제 #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);
        }