Пример #1
0
        // GET: Operator
        public async Task <ActionResult> GetList()
        {
            TypeBPJSRepository Repository = new TypeBPJSRepository();

            ViewData["ListTypeBPJS"] = await Repository.GetBPJSType();

            return(PartialView("_SimpleGrid"));
        }
Пример #2
0
        public async Task <ActionResult> Delete(MasterTypeBPJS model)
        {
            try
            {
                TypeBPJSRepository Repository = new TypeBPJSRepository();
                var result = await Repository.DeleteTypeBPJS(model.BPJSId);

                if (result == true)
                {
                    return(await GetList());
                }
                else
                {
                    return(View(result));
                }
            }
            catch
            {
                return(View(false));
            }
        }
Пример #3
0
        public async Task <ActionResult> Edit(MasterTypeBPJS model)
        {
            try
            {
                TypeBPJSRepository Repository = new TypeBPJSRepository();
                var result = await Repository.EditBPJSType(model.BPJSId, model.Deskripsi, User.Identity.Name);

                if (result == true)
                {
                    return(await GetList());
                }
                else
                {
                    return(View(result));
                }
            }
            catch
            {
                return(View(false));
            }
        }
Пример #4
0
        public async Task <ActionResult> Create(MasterTypeBPJS model)
        {
            try
            {
                TypeBPJSRepository Repository = new TypeBPJSRepository();
                var result = await Repository.CreateTypeBPJS(model.BPJSId, model.Deskripsi, User.Identity.Name);

                if (result == true)
                {
                    return(await GetList());
                }
                else
                {
                    return(View(result));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("{0} Exception caught.", e);
                return(View(false));
            }
        }