Example #1
0
        public async Task <int> insertGetID([FromBody] UserPriviligeBranchesVM entity)
        {
            var result = 0;

            foreach (var item in entity.COM_BRN_ID)
            {
                var entityAdd = new UserPriviligeBranches
                {
                    ID         = entity.ID,
                    COM_BRN_ID = item
                };
                result = uPrivBranServices.InsertGetID(entityAdd);
                await LogData(null, entity.ID.ToString());
            }
            ;
            return(result);
        }
Example #2
0
        public async Task <IHttpActionResult> add([FromBody] UserPriviligeBranchesVM entity)
        {
            await uPrivBranServices.DeleteAll(entity.ID);

            foreach (var item in entity.COM_BRN_ID)
            {
                var entityAdd = new UserPriviligeBranches
                {
                    ID         = entity.ID,
                    COM_BRN_ID = item
                };

                //string controllerName = ControllerContext.RouteData.Values["controller"].ToString();
                await uPrivBranServices.InsertAsync(entityAdd);

                //await LogData(entity.ID.ToString());
            }
            ;

            return(Ok());
        }