public void FireDeleteEntity(WorkingModel c) { if (ReadOnly) return; WorkingModel entity = c; if (entity == null) entity = FocusedEntity; if (entity != null) { //if (IsUsedWorkingModel(entity.ID)) return; if (QuestionMessageYes(GetLocalized("QuestionDeleteLunchModel"))) { try { ClientEnvironment.CountryService.WorkingModelService.DeleteByID(entity.ID); _listEntities.Remove(entity); UpdateBarButtonEnable(); } catch (ValidationException) { ErrorMessage(GetLocalized("CantDeleteLunchModel")); } catch (EntityException ex) { ProcessEntityException(ex); } } } }
public void FireNewEntity() { if (ReadOnly) return; if (Country == null) return; WorkingModel entity = new WorkingModel(); entity.CountryID = Country.ID; entity.WorkingModelType = WorkingModelType.LunchModel; FormLunchModel countryform = new FormLunchModel(entity); countryform.Text = GetLocalized("NewLunch"); countryform.isNew = true; if (FocusedEntity != null) { countryform.setReadOnlyTypeLunch(FocusedEntity.IsDurationTime); } if (countryform.ShowDialog() == DialogResult.OK) { _listEntities.Add((WorkingModel)countryform.Entity); UpdateBarButtonEnable(); } }
public void FireEditEntity(WorkingModel c) { if (ReadOnly) return; WorkingModel entity = c; if (entity == null) entity = FocusedEntity; if (entity != null) { FormLunchModel countryform = new FormLunchModel(entity); countryform.Text = GetLocalized("editLunch"); countryform.isNew = false; if (FocusedEntity != null && gridViewLunch.RowCount > 1) { countryform.setReadOnlyTypeLunch(FocusedEntity.IsDurationTime); } if (countryform.ShowDialog() == DialogResult.OK) { _listEntities.ResetItemById(entity.ID); } } }
public WorkingModelName( long languageID, string name, WorkingModel workingModel ) { this._languageID = languageID; this._name = name; this._workingModel = workingModel; }
public WorkingModelName(long languageID, string name, WorkingModel workingModel) { this._languageID = languageID; this._name = name; this._workingModel = workingModel; }
public WorkingModelWrapper(WorkingModel model) { _workingmodel = model; BuildConditions (); }