Exemplo n.º 1
0
        public C_KP_Rule GetKPRule(OleExec sfcdb, string partno, string mpn, string scanType)
        {
            C_KP_Rule kpRule = new C_KP_Rule();

            try
            {
                string  sql = $@" select * from c_kp_rule where partno='{partno}' and mpn='{mpn}' and scantype='{scanType}' ";
                DataSet ds  = sfcdb.ExecSelect(sql);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    Row_C_KP_Rule row = (Row_C_KP_Rule)this.NewRow();
                    row.loadData(ds.Tables[0].Rows[0]);
                    kpRule = row.GetDataObject();
                }
                else
                {
                    kpRule = null;
                }
            }
            catch
            {
                kpRule = null;
            }
            return(kpRule);
        }
Exemplo n.º 2
0
        public C_KP_Rule GetDataObject()
        {
            C_KP_Rule DataObject = new C_KP_Rule();

            DataObject.EDIT_EMP  = this.EDIT_EMP;
            DataObject.EDIT_TIME = this.EDIT_TIME;
            DataObject.REGEX     = this.REGEX;
            DataObject.SCANTYPE  = this.SCANTYPE;
            DataObject.MPN       = this.MPN;
            DataObject.PARTNO    = this.PARTNO;
            DataObject.ID        = this.ID;
            return(DataObject);
        }