Example #1
0
 public ActionResult Add(District e)
 {
     ActionResult ar = null;
     try {
         this.BeforeAddData(e, ref ar);
         if (ar == null) {
             this.Service.Add(e);
             e = this.Service.FindById(e.Id);
             //ar = this.Json(new AjaxOperationResult { Data = e, Successful = true });
             this.AfterAddData(e, ref ar);
         }
     } catch (Exception ex) {
         ar = this.Json(new AjaxOperationResult { Successful = false, Message = ex.Message });
     }
     return ar;
 }
Example #2
0
        private void FixupDistrict(District previousValue)
        {
            if (previousValue != null && previousValue.Student_File.Contains(this))
            {
                previousValue.Student_File.Remove(this);
            }

            if (District != null)
            {
                if (!District.Student_File.Contains(this))
                {
                    District.Student_File.Add(this);
                }
                if (DistrictId != District.Id)
                {
                    DistrictId = District.Id;
                }
            }
            else if (!_settingFK)
            {
                DistrictId = null;
            }
        }
Example #3
0
partial         void BeforeUpdateData(District e, ref ActionResult ar);
Example #4
0
partial         void BeforeShowEditView(District e);
Example #5
0
partial         void BeforeAddData(District e, ref ActionResult ar);
Example #6
0
partial         void AfterUpdateData(District e, ref ActionResult ar);
Example #7
0
partial         void AfterAddData(District e, ref ActionResult ar);
Example #8
0
partial         void AddRowToGridModel(LigerGridModel m, District e);