コード例 #1
0
 partial void Deletereported_item(reported_item instance);
コード例 #2
0
 partial void Insertreported_item(reported_item instance);
コード例 #3
0
 partial void Updatereported_item(reported_item instance);
コード例 #4
0
        public JsonResult ReportBike(reported_item item)
        {
            if (ContextManager.Current.UserKey == null)
                return Json(new { Success = true, LoggedIn = false });
            else
            {
                var context = new DAL.DataClassesDataContext();
                //var item = new DAL.DataClassesDataContext().items.Where(i => i.serial_no == serialNo).SingleOrDefault();
                item.user_key = ContextManager.Current.UserKey;
                context.reported_items.InsertOnSubmit(item);
                context.SubmitChanges();

                //HttpContext.Application["totalNumberOfBikesRegistered"] = Convert.ToInt32(HttpContext.Application["totalNumberOfBikesRegistered"]) + 1;

                return Json(new { Success = true, LoggedIn = true });
            }
        }