示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasgtglsave(ref DataRow row, Sasgtglsave entity)
 {
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("tariffglno", entity.tariffglno);
     row.SetField("sasgtrowid", entity.sasgtrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Sasgtglsave BuildSasgtglsaveFromRow(DataRow row)
        {
            Sasgtglsave entity = new Sasgtglsave();

            entity.tariffcd        = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.tariffglno      = row.IsNull("tariffglno") ? string.Empty : row.Field <string>("tariffglno");
            entity.sasgtrowid      = row.Field <byte[]>("sasgtrowid").ToStringEncoded();
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }