コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSastfgetdetail(ref DataRow row, Sastfgetdetail entity)
 {
     row.SetField("sastfrowid", entity.sastfrowid.ToByteArray());
     row.SetField("whse", entity.whse);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Sastfgetdetail BuildSastfgetdetailFromRow(DataRow row)
        {
            Sastfgetdetail entity = new Sastfgetdetail();

            entity.sastfrowid = row.Field <byte[]>("sastfrowid").ToStringEncoded();
            entity.whse       = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.custno     = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto     = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }