public ActionResult MovieRoom_R_Edit(long ID) { var R = DC.MovieRoom_Row.FirstOrDefault(q => q.MRRID == ID); if (R != null) { R = new MovieRoom_Row(); } return(View(R)); }
public ActionResult MovieRoom_R_Edit(long MRRID, string RowName, int SortNo) { var R = DC.MovieRoom_Row.FirstOrDefault(q => q.MRRID == MRRID); if (R != null) { R = new MovieRoom_Row(); } R.RowName = RowName; R.SortNo = SortNo; R.UpdDate = DateTime.Now; if (MRRID == 0) { R.CreDate = R.UpdDate; DC.MovieRoom_Row.InsertOnSubmit(R); } DC.SubmitChanges(); return(View("MovieRoom_R_List")); }