记录常用方法:
Type formType = this.GetType();
// 获取字段信息
FieldInfo fieldInfo = formType.GetField(instanceName, BindingFlags.NonPublic | BindingFlags.Instance);
if (fieldInfo != null)
{
// 获取控件实例
object controlInstance = fieldInfo.GetValue(this);
Cylinder cylinder = controlInstance as Liquid.Cylinder;
cylinder.MinWarningLineValue = Convert.ToString(minLineValue);
cylinder.MaxWarningLineValue = Convert.ToString(maxLineValue);
cylinders = getCylinderConfig();
//查询数据库
int paramId = cylinders.Where(_ => _.indexId == Convert.ToInt32(instanceName.Replace("cylinder", "")) + 33).FirstOrDefault().paramConfigId;
accessHelper.UpdateParamConfigById(paramId + "", minLineValue, maxLineValue);
}