示例#1
0
 public Models.WorkPlaceType Post(Models.WorkPlaceType workplaceType)
 {
     if (workplaceType == null || !ModelState.IsValid)
     {
         throw new HttpException((int)HttpStatusCode.BadRequest, "Invalid Request");
     }
     return(workplaceTypeService.AddUpdateWorkPlaceType(workplaceType.CreateFrom()).CreateFromm());
 }
示例#2
0
 public Boolean Delete(Models.WorkPlaceType workplaceType)
 {
     if (workplaceType == null || !ModelState.IsValid)
     {
         throw new HttpException((int)HttpStatusCode.BadRequest, "Invalid Request");
     }
     workplaceTypeService.DeleteWorkPlaceType(workplaceType.WorkPlaceTypeId);
     return(true);
 }