예제 #1
0
        public string UpdateComponents(ComponentsModel componentsModel)
        {
            Components UpdateComponents = _componentRepository.GetComponentsByID(componentsModel.ID);

            if (UpdateComponents != null)
            {
                UpdateComponents.ID              = componentsModel.ID;
                UpdateComponents.ComponentName   = componentsModel.ComponentName;
                UpdateComponents.ComponentTypeID = componentsModel.ComponentTypeID;
                UpdateComponents.Description     = componentsModel.Description;
            }
            _componentRepository.UpdateComponent(UpdateComponents);
            return(componentsModel.ToString());
        }
예제 #2
0
        public int UpdateComponents(ComponentsModel componentsModel)
        {
            Components UpdateComponents = _componentRepository.GetComponentsByID(componentsModel.ID);

            if (UpdateComponents != null)
            {
                UpdateComponents.ID = componentsModel.ID;
                UpdateComponents.ComponentName = componentsModel.ComponentName;
                UpdateComponents.ComponentTypeID = componentsModel.ComponentTypeID;
                UpdateComponents.Description = componentsModel.Description;
            }
            UpdateComponents = _componentRepository.UpdateComponent(UpdateComponents);
            componentsModel.ID = UpdateComponents.ID;
            return componentsModel.ID;
        }