Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAretsplitpay(ref DataRow row, Aretsplitpay entity)
 {
     row.SetField("paymtno", entity.paymtno);
     row.SetField("amount", entity.amount);
     row.SetField("origamount", entity.origamount);
     row.SetField("discamt", entity.discamt);
     row.SetField("origdiscamt", entity.origdiscamt);
     row.SetField("disputefl", entity.disputefl);
     row.SetField("origdisputefl", entity.origdisputefl);
     row.SetField("duedt", entity.duedt);
     row.SetField("discdt", entity.discdt);
     row.SetField("discamtenabled", entity.discamtenabled);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Aretsplitpay BuildAretsplitpayFromRow(DataRow row)
        {
            Aretsplitpay entity = new Aretsplitpay();

            entity.paymtno        = row.IsNull("paymtno") ? 0 : row.Field <int>("paymtno");
            entity.amount         = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.origamount     = row.IsNull("origamount") ? decimal.Zero : row.Field <decimal>("origamount");
            entity.discamt        = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt");
            entity.origdiscamt    = row.IsNull("origdiscamt") ? decimal.Zero : row.Field <decimal>("origdiscamt");
            entity.disputefl      = row.Field <bool>("disputefl");
            entity.origdisputefl  = row.Field <bool>("origdisputefl");
            entity.duedt          = row.Field <DateTime?>("duedt");
            entity.discdt         = row.Field <DateTime?>("discdt");
            entity.discamtenabled = row.Field <bool>("discamtenabled");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }