Beispiel #1
0
        private static SiteGroup CopySiteGroup(COMPTEMP origin)
        {
            if (string.IsNullOrEmpty(origin.GRP_NAME) ||
                origin.SALES_REP == "PMS" ||
                origin.SALES_REP == "BMS")
                return null;

            var group = new SiteGroup
            {
                GroupName = origin.GRP_NAME,
                AgentComp = origin.AGENT_COMP
            };

            group.Type = "Group";
            return group;
        }
 public IHttpActionResult Post(SiteGroup siteGroup)
 {
     if (!ModelState.IsValid)return BadRequest(ModelState);
     _siteGroupService.Add(siteGroup);
     return Ok(new
     {
         data=siteGroup
     });
 }