예제 #1
0
        public static Manifestresults BuildManifestresultsFromRow(DataRow row)
        {
            Manifestresults entity = new Manifestresults();

            entity.carrierId   = row.IsNull("carrier_id") ? string.Empty : row.Field <string>("carrier_id");
            entity.coNum       = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.customData1 = row.IsNull("custom_data1") ? string.Empty : row.Field <string>("custom_data1");
            entity.customData2 = row.IsNull("custom_data2") ? string.Empty : row.Field <string>("custom_data2");
            entity.customData3 = row.IsNull("custom_data3") ? string.Empty : row.Field <string>("custom_data3");
            entity.customData4 = row.IsNull("custom_data4") ? string.Empty : row.Field <string>("custom_data4");
            entity.customData5 = row.IsNull("custom_data5") ? string.Empty : row.Field <string>("custom_data5");
            entity.dateTime    = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.dockId      = row.IsNull("dock_id") ? string.Empty : row.Field <string>("dock_id");
            entity.manifestId  = row.IsNull("manifest_id") ? 0 : row.Field <int>("manifest_id");
            entity.manifestNum = row.IsNull("manifest_num") ? 0 : row.Field <int>("manifest_num");
            entity.rowStatus   = row.Field <bool>("row_status");
            entity.trailerNum  = row.IsNull("trailer_num") ? string.Empty : row.Field <string>("trailer_num");
            entity.transDate   = row.IsNull("trans_date") ? string.Empty : row.Field <string>("trans_date");
            entity.transProc   = row.IsNull("trans_proc") ? string.Empty : row.Field <string>("trans_proc");
            entity.transUser   = row.IsNull("trans_user") ? string.Empty : row.Field <string>("trans_user");
            entity.whNum       = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.rowID       = row.Field <byte[]>("rowID").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
예제 #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromManifestresults(ref DataRow row, Manifestresults entity)
 {
     row.SetField("carrier_id", entity.carrierId);
     row.SetField("co_num", entity.coNum);
     row.SetField("custom_data1", entity.customData1);
     row.SetField("custom_data2", entity.customData2);
     row.SetField("custom_data3", entity.customData3);
     row.SetField("custom_data4", entity.customData4);
     row.SetField("custom_data5", entity.customData5);
     row.SetField("date_time", entity.dateTime);
     row.SetField("dock_id", entity.dockId);
     row.SetField("manifest_id", entity.manifestId);
     row.SetField("manifest_num", entity.manifestNum);
     row.SetField("row_status", entity.rowStatus);
     row.SetField("trailer_num", entity.trailerNum);
     row.SetField("trans_date", entity.transDate);
     row.SetField("trans_proc", entity.transProc);
     row.SetField("trans_user", entity.transUser);
     row.SetField("wh_num", entity.whNum);
     row.SetField("rowID", entity.rowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }