Beispiel #1
0
        public List <ExpressException> getExpressExceptions(string sql)
        {
            string        sqlStr = "select EO_ID,EO_EIID,EO_LCID,EO_BARCODE,EO_ORDERNO,EO_EXPTYPE,EO_VALIDATECODE,EO_OVERTIMEDAY,EO_OVERTIMECNT,EO_OVERTIMEPRICE,EO_OVERTIMEFEE,EO_REMARK,TF_BUZSTATUS,TF_DELETEFLAG,TF_CREATERID,TF_CREATERNAME,TF_CREATEDATE,TF_UPDATERID,TF_UPDATERNAME,TF_UPDATEDATE,TF_BACKUPFIELD1,TF_BACKUPFIELD2,TF_BACKUPFIELD3 from EBOX_EXPRESSEXCEPTION " + sql;
            SQLiteCommand cmd    = new SQLiteCommand();

            cmd.CommandText = sqlStr;
            cmd.Connection  = conn;
            SQLiteDataReader        reader = cmd.ExecuteReader();
            List <ExpressException> lists  = new List <ExpressException>();

            while (reader.Read())
            {
                ExpressException result = convertExpressException(reader);
                lists.Add(result);
            }
            cmd.Dispose();
            return(lists);
        }
Beispiel #2
0
        public ExpressException convertExpressException(SQLiteDataReader reader)
        {
            ExpressException expressException = new ExpressException();

            expressException.EOID = reader.GetInt32(0);

            if (!Convert.IsDBNull(reader.GetValue(1)))
            {
                expressException.EOEIID = reader.GetInt32(1);
            }
            if (!Convert.IsDBNull(reader.GetValue(2)))
            {
                expressException.EOLCID = reader.GetInt32(2);
            }
            if (!Convert.IsDBNull(reader.GetValue(3)))
            {
                expressException.EOBARCODE = reader.GetString(3);
            }
            if (!Convert.IsDBNull(reader.GetValue(4)))
            {
                expressException.EOORDERNO = reader.GetString(4);
            }
            if (!Convert.IsDBNull(reader.GetValue(5)))
            {
                expressException.EOEXPTYPE = reader.GetInt32(5);
            }
            if (!Convert.IsDBNull(reader.GetValue(6)))
            {
                expressException.EOVALIDATECODE = reader.GetInt32(6);
            }
            if (!Convert.IsDBNull(reader.GetValue(7)))
            {
                expressException.EOOVERTIMEDAY = reader.GetInt32(7);
            }
            if (!Convert.IsDBNull(reader.GetValue(8)))
            {
                expressException.EOOVERTIMECNT = reader.GetInt32(8);
            }
            if (!Convert.IsDBNull(reader.GetValue(9)))
            {
                expressException.EOOVERTIMEPRICE = reader.GetDouble(9);
            }
            if (!Convert.IsDBNull(reader.GetValue(10)))
            {
                expressException.EOOVERTIMEFEE = reader.GetDouble(10);
            }
            if (!Convert.IsDBNull(reader.GetValue(11)))
            {
                expressException.EOREMARK = reader.GetString(11);
            }
            if (!Convert.IsDBNull(reader.GetValue(12)))
            {
                expressException.TFBUZSTATUS = reader.GetInt32(12);
            }
            if (!Convert.IsDBNull(reader.GetValue(13)))
            {
                expressException.TFDELETEFLAG = reader.GetInt32(13);
            }
            if (!Convert.IsDBNull(reader.GetValue(14)))
            {
                expressException.TFCREATERID = reader.GetInt32(14);
            }
            if (!Convert.IsDBNull(reader.GetValue(15)))
            {
                expressException.TFCREATERNAME = reader.GetString(15);
            }
            if (!Convert.IsDBNull(reader.GetValue(16)))
            {
                expressException.TFCREATEDATE = reader.GetString(16);
            }
            if (!Convert.IsDBNull(reader.GetValue(17)))
            {
                expressException.TFUPDATERID = reader.GetInt32(17);
            }
            if (!Convert.IsDBNull(reader.GetValue(18)))
            {
                expressException.TFUPDATERNAME = reader.GetString(18);
            }
            if (!Convert.IsDBNull(reader.GetValue(19)))
            {
                expressException.TFUPDATEDATE = reader.GetString(19);
            }
            if (!Convert.IsDBNull(reader.GetValue(20)))
            {
                expressException.TFBACKUPFIELD1 = reader.GetDouble(20);
            }
            if (!Convert.IsDBNull(reader.GetValue(21)))
            {
                expressException.TFBACKUPFIELD2 = reader.GetString(21);
            }
            if (!Convert.IsDBNull(reader.GetValue(22)))
            {
                expressException.TFBACKUPFIELD3 = reader.GetString(22);
            }
            return(expressException);
        }