Exemplo n.º 1
0
        public StateDetailModel RetrieveDetail(int p_id)
        {
            var Temp = new StateDetailModel();

            using (var db = new MES_DATABASE())
            {
                Temp = db.STA_StateList
                       .Where(id => id.ID_STA == p_id)
                       .Select(MapperState.MapSTAToStateDetail)
                       .SingleOrDefault();
            }
            return(Temp);
        }
Exemplo n.º 2
0
 public static STA_StateList MapStateDetailToSTA(StateDetailModel entity)
 {
     return(new STA_StateList()
     {
         ID_STA = entity.ID_STA,
         ID_ENT = entity.ID_ENT,
         //Comments = entity.Comments.Trim(),
         Comments = entity.Comments,
         Purpous = entity.Purpous,
         L_END_STATE = entity.L_END_STATE,
         L_START_STATE = entity.L_START_STATE,
         L_VALID = entity.L_VALID,
         ENT_Entity = entity.ENT_Entity
     });
 }
Exemplo n.º 3
0
        public void SetState(StateDetailModel p_State)
        {
            if (p_State == null)
            {
                isEditMode = false;
                p_State    = new MES_2.Modules.SystemModule.State.StateDetailModel();
                EntityAll  = new ObservableCollection <EntityModel>(EntitiesRepository.Instance.Retrieve());
            }
            else
            {
                Entity = new EntityModel();
                Entity = MapperEntity.MapENTToMapperEntity(p_State.ENT_Entity);
            }

            EdditingState = p_State;
            if (State != null)
            {
                State.ErrorsChanged -= RaiseCanExecuteChanged;
            }
            State = new StateFullEditable();
            State.ErrorsChanged += RaiseCanExecuteChanged;
            CopyState(_edditingState, State);
        }