コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromEmptranssummary(ref DataRow row, Emptranssummary entity)
 {
     row.SetField("date_time", entity.dateTime);
     row.SetField("trans_type", entity.transType);
     row.SetField("trans_name", entity.transName);
     row.SetField("numTrans", entity.numTrans);
     row.SetField("emptranssummaryuserfield", entity.emptranssummaryuserfield);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Emptranssummary BuildEmptranssummaryFromRow(DataRow row)
        {
            Emptranssummary entity = new Emptranssummary();

            entity.dateTime  = row.IsNull("date_time") ? string.Empty : row.Field <string>("date_time");
            entity.transType = row.IsNull("trans_type") ? string.Empty : row.Field <string>("trans_type");
            entity.transName = row.IsNull("trans_name") ? string.Empty : row.Field <string>("trans_name");
            entity.numTrans  = row.IsNull("numTrans") ? 0 : row.Field <int>("numTrans");
            entity.emptranssummaryuserfield = row.IsNull("emptranssummaryuserfield") ? string.Empty : row.Field <string>("emptranssummaryuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }