Пример #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            M_CityMaster m_CityMaster = await db.M_CityMaster.FindAsync(id);

            db.M_CityMaster.Remove(m_CityMaster);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Пример #2
0
        public async Task <ActionResult> Edit([Bind(Include = "CityID,CityCode,CityName,StateCountryID,CreatedBy,CreatedDate,ModifiedBy,ModifiedDate,Active")] M_CityMaster m_CityMaster)
        {
            if (ModelState.IsValid)
            {
                db.Entry(m_CityMaster).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.StateCountryID = new SelectList(db.M_StateCountryMaster, "StateCountryID", "StateCode", m_CityMaster.StateCountryID);
            return(View(m_CityMaster));
        }
Пример #3
0
        // GET: M_CityMaster/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            M_CityMaster m_CityMaster = await db.M_CityMaster.FindAsync(id);

            if (m_CityMaster == null)
            {
                return(HttpNotFound());
            }
            return(View(m_CityMaster));
        }
Пример #4
0
        // GET: M_CityMaster/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            M_CityMaster m_CityMaster = await db.M_CityMaster.FindAsync(id);

            if (m_CityMaster == null)
            {
                return(HttpNotFound());
            }
            ViewBag.StateCountryID = new SelectList(db.M_StateCountryMaster, "StateCountryID", "StateCode", m_CityMaster.StateCountryID);
            return(View(m_CityMaster));
        }