Ejemplo n.º 1
0
        public async Task <ActionResult> Post(Uom _Uom)
        {
            var newUom = new Models.Uom()
            {
                Id      = _Uom.Id,
                UomName = _Uom.UomName,
            };

            db.Uoms.Add(newUom);
            await db.SaveChangesAsync();

            return(new CreatedAtRouteResult("GetUom", new { id = _Uom.Id }, newUom));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> Post(Clients _client)
        {
            var newclient = new Models.Clients()
            {
                BusinessName = _client.BusinessName,
                Shortname    = _client.Shortname
            };

            db.Clients.Add(newclient);
            await db.SaveChangesAsync();

            return(new CreatedAtRouteResult("GetClient", new { id = _client.Id }, newclient));
        }
Ejemplo n.º 3
0
        public async Task <ActionResult> Post(Scope _scope)
        {
            var newscope = new Models.Scope()
            {
                Id        = _scope.Id,
                ScopeName = _scope.ScopeName,
            };

            db.Scopes.Add(newscope);
            await db.SaveChangesAsync();

            return(new CreatedAtRouteResult("GetScope", new { id = _scope.Id }, newscope));
        }
Ejemplo n.º 4
0
        public async Task <ActionResult> Post(Stage _stage)
        {
            var newsite = new Models.Stage()
            {
                Id = _stage.Id,

                Stagename = _stage.Stagename,
            };

            db.Stages.Add(newsite);
            await db.SaveChangesAsync();

            return(new CreatedAtRouteResult("GetStage", new { id = _stage.Id }, newsite));
        }
Ejemplo n.º 5
0
        public async Task <ActionResult> Post(Material _Material)
        {
            var newsite = new Models.Material()
            {
                Id          = _Material.Id,
                Code        = _Material.Code,
                Description = _Material.Description
            };

            db.Materials.Add(newsite);
            await db.SaveChangesAsync();

            return(new CreatedAtRouteResult("GetMaterial", new { id = _Material.Id }, newsite));
        }
Ejemplo n.º 6
0
        public async Task <ActionResult> Post(Site _site)
        {
            var newsite = new Models.Site()
            {
                SiteId    = _site.SiteId,
                Active    = true,
                Brgy      = _site.Brgy,
                Homing    = _site.Homing,
                Poid      = _site.Poid,
                SiteClose = false,
                SiteName  = _site.SiteName,
            };

            db.Sites.Add(newsite);
            await db.SaveChangesAsync();

            return(new CreatedAtRouteResult("GetSite", new { id = _site.Id }, newsite));
        }