Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcentryserialscreate(ref DataRow row, Icentryserialscreate entity)
 {
     row.SetField("serialno", entity.serialno);
     row.SetField("binloc", entity.binloc);
     row.SetField("comment", entity.comment);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("cost", entity.cost);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("selectedfl", entity.selectedfl);
     row.SetField("wtreturnorigasked", entity.wtreturnorigasked);
     row.SetField("wtreturnoriganswer", entity.wtreturnoriganswer);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Icentryserialscreate BuildIcentryserialscreateFromRow(DataRow row)
        {
            Icentryserialscreate entity = new Icentryserialscreate();

            entity.serialno           = row.IsNull("serialno") ? string.Empty : row.Field <string>("serialno");
            entity.binloc             = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.comment            = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            entity.reasunavty         = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.cost               = row.IsNull("cost") ? decimal.Zero : row.Field <decimal>("cost");
            entity.receiptdt          = row.Field <DateTime?>("receiptdt");
            entity.selectedfl         = row.Field <bool>("selectedfl");
            entity.wtreturnorigasked  = row.Field <bool>("wtreturnorigasked");
            entity.wtreturnoriganswer = row.Field <bool>("wtreturnoriganswer");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }