Ejemplo n.º 1
0
        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            var ds = context.Instance as QcElementDescriptor;

            if (ds.RowObject is QcCheckEntry)
            {
                QcCheckEntry check = ds.RowObject as QcCheckEntry;
                string       v     = value.ToString();
                if (v != check["结果值枚举"])
                {
                    switch (v)
                    {
                    case "Y/N":
                        check["限差值"] = "Y=100;N=0";
                        break;

                    case "A?B?C?D?":
                        check["限差值"] = "A=42;B=12;C=4;D=1";
                        break;

                    default:
                        break;
                    }
                }
            }
            return(value);
        }
Ejemplo n.º 2
0
        //public class 结果值枚举Converter : QcTypeConverter
        //{
        //    public static string[] 结果值枚举 = new string[] { "Y/N", "R:R0", "M;M0", "A?B?C?D?" };
        //    public 结果值枚举Converter() : base(结果值枚举) { }

        //}

        public QcCheckEntry  CloneTo(QcSubQuaelement Parent)
        {
            QcCheckEntry qce = new QcCheckEntry(Parent);

            qce["标准检查项编码"] = this["标准检查项编码"];
            qce.CloneFields(this);
            return(qce);
        }
Ejemplo n.º 3
0
 public QcEvaDataRow(DataRow row, QcCheckEntry checkentry)
     : base(row)
 {
     this.checkentry = checkentry;
     if (this.checkentry != null)
     {
         检查项编码 = checkentry.Code;
     }
 }
Ejemplo n.º 4
0
 public QcProductOperator(QcCheckEntry parent, string code) : base(null, TableName)
 {
     Parent          = parent;
     m_CheckOperator = GetCheckOperatorByCode(code);
 }
Ejemplo n.º 5
0
 public QcProductOperator(QcCheckEntry parent, DataRow row) : base(row, TableName)
 {
     Parent          = parent;
     m_CheckOperator = GetCheckOperatorByCode(row["算子编码"].ToString());
 }
Ejemplo n.º 6
0
        public static List <QcProductOperator> GetQcProductOperator(QcCheckEntry checkentry)
        {
            var pls = DbHelper.Query("Select * from " + QcProductOperator.TableName + " where 检查项编码='" + checkentry.Code + "'");

            return((from p in pls select new QcProductOperator(checkentry, p)).ToList());
        }
Ejemplo n.º 7
0
        public QcProductOperator CloneTo(QcCheckEntry Parent)
        {
            QcProductOperator qce = new QcProductOperator(Parent, this.CheckOperator.Name);

            return(qce);
        }