Beispiel #1
0
        public string TipoInsert(TipoEmployee entity)
        {
            this.unitOfWork.GeTipoRepository.Insert(entity);
            int inserData = this.unitOfWork.Save();

            if (inserData > 0)
            {
                return("Successfully Inserted of address records");
            }
            else
            {
                return("Insertion faild");
            }
        }
Beispiel #2
0
        public string TipoUpdate(TipoEmployee entity)
        {
            objAdd = unitOfWork.GeTipoRepository.GetByID(entity.TipoEmployeeId);

            if (objAdd != null)
            {
                objAdd.Descripcion = entity.Descripcion;
            }
            this.unitOfWork.GeTipoRepository.Attach(objAdd);
            int result = this.unitOfWork.Save();

            if (result > 0)
            {
                return("Sucessfully updated of tipo records");
            }
            else
            {
                return("Updation faild");
            }
        }
Beispiel #3
0
        public string UpdateTipo(TipoEmployee parameter)
        {
            string objAddress;

            try
            {
                objAddress = this.objTipo.TipoUpdate(parameter);
            }
            catch (ApplicationException ex)
            {
                throw new HttpResponseException(new HttpResponseMessage {
                    StatusCode = HttpStatusCode.BadRequest, ReasonPhrase = ex.Message
                });
            }
            catch (Exception ex)
            {
                throw new HttpResponseException(new HttpResponseMessage {
                    StatusCode = HttpStatusCode.BadGateway, ReasonPhrase = ex.Message
                });
            }

            return(objAddress);
        }