Beispiel #1
0
        public async Task <IHttpActionResult> Update(WorkAcceptance item)
        {
            if (ModelState.IsValid)
            {
                await RepositoryOperation <WorkAcceptance> .UpdateItemAsync(item.Id, item);

                return(Ok("Index"));
            }
            return(Ok());
        }
        public async Task <ActionResult> EditAsync(WorkAcceptance item)
        {
            item.Formdata.formName = "Work Acceptance";
            if (ModelState.IsValid)
            {
                await RepositoryOperation <WorkAcceptance> .UpdateItemAsync(item.Id, item);

                return(RedirectToAction("Index"));
            }

            return(View(item));
        }
        public async Task <ActionResult> CreateAsync(WorkAcceptance item)
        {
            item.partitionName = "Work Acceptance";
            if (ModelState.IsValid)
            {
                await RepositoryOperation <WorkAcceptance> .CreateItemAsync(item);

                return(RedirectToAction("Index"));
            }

            return(View(item));
        }
        public async Task <ActionResult> DeleteAsync(string id, string partition)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            WorkAcceptance item = await RepositoryOperation <WorkAcceptance> .GetItemAsync(id, partition);

            if (item == null)
            {
                return(HttpNotFound());
            }

            return(View(item));
        }
        public async Task <ActionResult> DetailsAsync(string id, string partition)
        {
            WorkAcceptance item = await RepositoryOperation <WorkAcceptance> .GetItemAsync(id, partition);

            return(View(item));
        }
Beispiel #6
0
        public async Task <IHttpActionResult> Read(string id, string category)
        {
            WorkAcceptance item = await RepositoryOperation <WorkAcceptance> .GetItemAsync(id, category);

            return(Ok(item));
        }