Beispiel #1
0
        public IHttpActionResult CreatePracticeType(PracticeTypeModel model)
        {
            var response = new DataResponse <EntityPracticeType>();

            if (ModelState.IsValid)
            {
                var entityPracticeType = new EntityPracticeType();
                entityPracticeType.PracticeType = model.PracticeType;
                entityPracticeType.IsActive     = model.IsActive;
                entityPracticeType.CreatedBy    = CurrentUserId;
                response = repository.Insert(entityPracticeType);
            }
            return(Ok <DataResponse>(response));
        }
Beispiel #2
0
        public IHttpActionResult UpdatePracticeType(PracticeTypeModel model)
        {
            var response = new DataResponse <EntityPracticeType>();

            if (ModelState.IsValid)
            {
                var entityPracticeType = new EntityPracticeType();
                entityPracticeType.Id           = model.Id;
                entityPracticeType.PracticeType = model.PracticeType;
                entityPracticeType.IsActive     = model.IsActive;
                entityPracticeType.UpdatedBy    = CurrentUserId;
                entityPracticeType.UpdatedOn    = System.DateTime.UtcNow;
                response = repository.UpdatePracticeSpeciality(entityPracticeType);
            }
            return(Ok <DataResponse>(response));
        }