public ActionResult DeleteConfirmed(int id)
        {
            marketinglist marketinglist = db.marketinglists.Find(id);

            db.marketinglists.Remove(marketinglist);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public String LineCreate(string fkidx, marketinglistline line)
        {
            marketinglist header = db.marketinglists.Find(Convert.ToInt32(fkidx));

            line.marketinglist = header;
            db.marketinglistlines.Add(line);
            db.SaveChanges();
            return("");
        }
 public ActionResult Edit([Bind(Include = "marketinglistId,code,name,description,startdate,enddate,DetailForm_pkidx_marketinglistlineId,DetailForm_ddl_accountId,DetailForm_description")] marketinglist marketinglist)
 {
     if (ModelState.IsValid)
     {
         db.Entry(marketinglist).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(marketinglist));
 }
        public String LineEdit(string fkidx, marketinglistline line)
        {
            if (ModelState.IsValid)
            {
                marketinglist header = db.marketinglists.Find(Convert.ToInt32(fkidx));
                line.marketinglist   = header;
                db.Entry(line).State = EntityState.Modified;
                db.SaveChanges();
                return("");
            }

            return("");
        }
        // GET: /CRM/marketinglists/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            marketinglist marketinglist = db.marketinglists.Find(id);

            if (marketinglist == null)
            {
                return(HttpNotFound());
            }
            return(View(marketinglist));
        }