Пример #1
0
 public ActionResult Add(EmploymentCompany 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;
 }
Пример #2
0
partial         void BeforeShowEditView(EmploymentCompany e);
Пример #3
0
partial         void BeforeUpdateData(EmploymentCompany e, ref ActionResult ar);
Пример #4
0
partial         void AfterUpdateData(EmploymentCompany e, ref ActionResult ar);
Пример #5
0
partial         void AddRowToGridModel(LigerGridModel m, EmploymentCompany e);
Пример #6
0
 public void Delete(EmploymentCompany entity)
 {
     this.DbContext.EmploymentCompanies.DeleteObject(entity);
 }
Пример #7
0
 public void Add(EmploymentCompany entity)
 {
     this.DbContext.EmploymentCompanies.AddObject(entity);
 }
Пример #8
0
 public void Update(EmploymentCompany entity)
 {
     var e = this.FindById(entity.Id);
     if (e != null) {
         e.Name = entity.Name;
         e.Type = entity.Type;
         e.Important = entity.Important;
         e.Website = entity.Website;
         e.Telephone = entity.Telephone;
         e.Fax = entity.Fax;
         e.Address = entity.Address;
         e.CityId = entity.CityId;
         e.Introduction = entity.Introduction;
         e.SourceType = entity.SourceType;
         e.Referer = entity.Referer;
         e.UserId = entity.UserId;
         e.EmployedQty = entity.EmployedQty;
         e.OldOaId = entity.OldOaId;
         e.TempProvId = entity.TempProvId;
         e.TempProvName = entity.TempProvName;
         e.TempCityId = entity.TempCityId;
         e.TempCityName = entity.TempCityName;
         e.AddTime = entity.AddTime;
     }
     //if (this.FindById(entity.Id) != null) {
     //	this.DbContext.EmploymentCompanies.Attach(entity);
     //	this.DbContext.ObjectStateManager.ChangeObjectState(entity, System.Data.EntityState.Modified);
     //}
 }