Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeetcardlookupresults(ref DataRow row, Oeetcardlookupresults entity)
 {
     row.SetField("cardno", entity.cardno);
     row.SetField("cono", entity.cono);
     row.SetField("custno", entity.custno);
     row.SetField("maxamount", entity.maxamount);
     row.SetField("mediacd", entity.mediacd);
     row.SetField("name", entity.name);
     row.SetField("seqno", entity.seqno);
     row.SetField("shipto", entity.shipto);
     row.SetField("mediadesc", entity.mediadesc);
     row.SetField("cReferenceRowid", entity.cReferenceRowid);
     row.SetField("dRefAmount", entity.dRefAmount);
     row.SetField("cRefType", entity.cRefType);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Oeetcardlookupresults BuildOeetcardlookupresultsFromRow(DataRow row)
        {
            Oeetcardlookupresults entity = new Oeetcardlookupresults();

            entity.cardno          = row.IsNull("cardno") ? string.Empty : row.Field <string>("cardno");
            entity.cono            = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.maxamount       = row.IsNull("maxamount") ? decimal.Zero : row.Field <decimal>("maxamount");
            entity.mediacd         = row.IsNull("mediacd") ? 0 : row.Field <int>("mediacd");
            entity.name            = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.shipto          = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.mediadesc       = row.IsNull("mediadesc") ? string.Empty : row.Field <string>("mediadesc");
            entity.cReferenceRowid = row.IsNull("cReferenceRowid") ? string.Empty : row.Field <string>("cReferenceRowid");
            entity.dRefAmount      = row.IsNull("dRefAmount") ? decimal.Zero : row.Field <decimal>("dRefAmount");
            entity.cRefType        = row.IsNull("cRefType") ? string.Empty : row.Field <string>("cRefType");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }