Example #1
0
        public async Task <ActionResult> Create(SupplerCompany collection)
        {
            try
            {
                // TODO: Add insert logic here
                if (ModelState.IsValid)
                {
                    await context.InsertSupplerCompany(collection);

                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }
Example #2
0
        public async Task <ActionResult> Edit(SupplerCompany sk)
        {
            try
            {
                // TODO: Add update logic here

                if (ModelState.IsValid)
                {
                    await context.UpdateSupplerCompany(sk);

                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(View());
                }
            }
            catch
            {
                return(View());
            }
        }