예제 #1
0
        public override List <MIDAS.GBX.BusinessObjects.BusinessValidation> Validate <T>(T entity)
        {
            BO.ProcedureCode procedureCode = (BO.ProcedureCode)(object) entity;
            var result = procedureCode.Validate(procedureCode);

            return(result);
        }
예제 #2
0
        public override T Convert <T, U>(U entity)
        {
            ProcedureCode procedureCode = entity as ProcedureCode;

            if (procedureCode == null)
            {
                return(default(T));
            }

            BO.ProcedureCode procedureCodeBO = new BO.ProcedureCode();

            procedureCodeBO.ID = procedureCode.Id;
            procedureCodeBO.ProcedureCodeText = procedureCode.ProcedureCodeText;
            procedureCodeBO.ProcedureCodeDesc = procedureCode.ProcedureCodeDesc;
            procedureCodeBO.Amount            = procedureCode.Amount;
            procedureCodeBO.CompanyId         = procedureCode.CompanyId;
            procedureCodeBO.SpecialityId      = procedureCode.SpecialityId;
            procedureCodeBO.RoomTestId        = procedureCode.RoomTestId;

            if (procedureCode.IsDeleted.HasValue)
            {
                procedureCodeBO.IsDeleted = procedureCode.IsDeleted.Value;
            }
            if (procedureCode.UpdateByUserID.HasValue)
            {
                procedureCodeBO.UpdateByUserID = procedureCode.UpdateByUserID.Value;
            }

            return((T)(object)procedureCodeBO);
        }