37 lines
897 B
C#
Executable File
37 lines
897 B
C#
Executable File
using System;
|
|
using System.Collections.Generic;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
|
|
namespace Opsoft.NetCore.O3App.Domain.UnitOfWork.MES.Model
|
|
{
|
|
abstract public class BaseQuality
|
|
{
|
|
public bool IsProperty(string propertyName)
|
|
{
|
|
PropertyInfo? perty = this.GetType().GetProperty(propertyName);
|
|
if (perty != null)
|
|
{
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public object GetValue(string propertyName)
|
|
{
|
|
PropertyInfo? perty = this.GetType().GetProperty(propertyName);
|
|
if (perty != null)
|
|
{
|
|
return perty.GetValue(this, null);
|
|
}
|
|
else
|
|
{
|
|
return string.Empty;
|
|
}
|
|
}
|
|
}
|
|
}
|