Exemple #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            M_NewsSubCategoryMaster m_NewsSubCategoryMaster = await db.M_NewsSubCategoryMaster.FindAsync(id);

            db.M_NewsSubCategoryMaster.Remove(m_NewsSubCategoryMaster);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public async Task <ActionResult> Edit([Bind(Include = "SubCategoryID,CategoryID,SubNewsCategory,SubNewsDesc,CreatedBy,CreatedDate,ModifiedBy,ModifiedDate,Active")] M_NewsSubCategoryMaster m_NewsSubCategoryMaster)
        {
            if (ModelState.IsValid)
            {
                db.Entry(m_NewsSubCategoryMaster).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.CategoryID = new SelectList(db.M_NewsCategoryMaster, "NewsCategoryID", "CategoryName", m_NewsSubCategoryMaster.CategoryID);
            return(View(m_NewsSubCategoryMaster));
        }
Exemple #3
0
        // GET: M_NewsSubCategoryMaster/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            M_NewsSubCategoryMaster m_NewsSubCategoryMaster = await db.M_NewsSubCategoryMaster.FindAsync(id);

            if (m_NewsSubCategoryMaster == null)
            {
                return(HttpNotFound());
            }
            return(View(m_NewsSubCategoryMaster));
        }
Exemple #4
0
        // GET: M_NewsSubCategoryMaster/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            M_NewsSubCategoryMaster m_NewsSubCategoryMaster = await db.M_NewsSubCategoryMaster.FindAsync(id);

            if (m_NewsSubCategoryMaster == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CategoryID = new SelectList(db.M_NewsCategoryMaster, "NewsCategoryID", "CategoryName", m_NewsSubCategoryMaster.CategoryID);
            return(View(m_NewsSubCategoryMaster));
        }