public bool Add(Shoop sp) { ShoopInterface ti = td.CreateShoop(); ti.Add(sp); return(td.SaveChange()); }
public ActionResult AddShop(Shoop p) { if (Session["name"] != null) { p.UserName = Session["name"].ToString(); bool b = sp.Add(p); if (b) { return(Content("ok")); } else { return(Content("no")); } } else { return(Content("k")); } }