Inheritance: Party
示例#1
0
 public void CreateRegion(Region entity, User currentUser)
 {
     if (partyDao.LoadParty(entity.Code) == null)
     {
         base.CreateRegion(entity);
     }
     else
     {
         CreateRegionOnly(entity);
     }
     Permission permission = new Permission();
     permission.Category = permissionCategoryMgr.LoadPermissionCategory(BusinessConstants.CODE_MASTER_PERMISSION_CATEGORY_TYPE_VALUE_REGION);
     permission.Code = entity.Code;
     permission.Description = entity.Name;
     permissionMgr.CreatePermission(permission);
     UserPermission userPermission = new UserPermission();
     userPermission.User = currentUser;
     userPermission.Permission = permission;
     userPermissionMgr.CreateUserPermission(userPermission);
 }
示例#2
0
        public int CreateRegionOnly(Region entity)
        {
            string sql = "insert into Region(code) values(@code) ";

            SqlParameter[] param = new SqlParameter[1];
            param[0] = new SqlParameter("@code", SqlDbType.NVarChar, 50);
            param[0].Value = entity.Code;
            return sqlHelperDao.Create(sql, param);
        }
示例#3
0
 public override void DeleteRegion(Region region)
 {
     DeleteRegion(region.Code);
 }
示例#4
0
 public override void CreateRegion(Region entity)
 {
     CreateRegion(entity, userMgr.GetMonitorUser());
 }
 public virtual void UpdateRegion(Region entity)
 {
     entityDao.UpdateRegion(entity);
 }
 public virtual void DeleteRegion(Region entity)
 {
     entityDao.DeleteRegion(entity);
 }
示例#7
0
 public IList<WorkCenter> GetWorkCenter(Region region, bool includeInactive)
 {
     return GetWorkCenter(region.Code, includeInactive);
 }
 public virtual void UpdateRegion(Region entity)
 {
     Update(entity);
 }
示例#9
0
 public void UpdateRegion(Region region)
 {
     RegionMgr.UpdateRegion(region);
 }
示例#10
0
 public IList<WorkCenter> GetWorkCenter(Region region)
 {
     return GetWorkCenter(region.Code, false);
 }
示例#11
0
 public void DeleteRegion(Region region)
 {
     RegionMgr.DeleteRegion(region);
 }
示例#12
0
 public void CreateRegion(Region region)
 {
     RegionMgr.CreateRegion(region);
 }
 public virtual void DeleteRegion(Region entity)
 {
     Delete(entity);
 }
示例#14
0
 public IList<Location> GetLocation(Region region)
 {
     return GetLocation(region.Code, false);
 }
 public virtual void CreateRegion(Region entity)
 {
     entityDao.CreateRegion(entity);
 }
示例#16
0
 public IList<Location> GetLocation(Region region, bool includeInactive)
 {
     return GetLocation(region.Code, includeInactive);
 }
 public virtual void CreateRegion(Region entity)
 {
     Create(entity);
 }