예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArsoccreditcard(ref DataRow row, Arsoccreditcard entity)
 {
     row.SetField("cardno", entity.cardno);
     row.SetField("cono", entity.cono);
     row.SetField("createdt", entity.createdt);
     row.SetField("custno", entity.custno);
     row.SetField("maxamount", entity.maxamount);
     row.SetField("mediacd", entity.mediacd);
     row.SetField("mediacddesc", entity.mediacddesc);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("name", entity.name);
     row.SetField("seqno", entity.seqno);
     row.SetField("shipto", entity.shipto);
     row.SetField("arsdrowid", entity.arsdrowid.ToByteArray());
     row.SetField("deletefl", entity.deletefl);
     row.SetField("processortype", entity.processortype);
     row.SetField("tokenid", entity.tokenid);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Arsoccreditcard BuildArsoccreditcardFromRow(DataRow row)
        {
            Arsoccreditcard entity = new Arsoccreditcard();

            entity.cardno        = row.IsNull("cardno") ? string.Empty : row.Field <string>("cardno");
            entity.cono          = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.createdt      = row.Field <DateTime?>("createdt");
            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.mediacddesc   = row.IsNull("mediacddesc") ? string.Empty : row.Field <string>("mediacddesc");
            entity.notesfl       = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            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.arsdrowid     = row.Field <byte[]>("arsdrowid").ToStringEncoded();
            entity.deletefl      = row.Field <bool>("deletefl");
            entity.processortype = row.IsNull("processortype") ? string.Empty : row.Field <string>("processortype");
            entity.tokenid       = row.IsNull("tokenid") ? string.Empty : row.Field <string>("tokenid");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }