Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAreledebitadd(ref DataRow row, Areledebitadd entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("invno", entity.invno);
     row.SetField("invamt", entity.invamt);
     row.SetField("duedt", entity.duedt);
     row.SetField("refer", entity.refer);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Areledebitadd BuildAreledebitaddFromRow(DataRow row)
        {
            Areledebitadd entity = new Areledebitadd();

            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.invno     = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.invamt    = row.IsNull("invamt") ? decimal.Zero : row.Field <decimal>("invamt");
            entity.duedt     = row.Field <DateTime?>("duedt");
            entity.refer     = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }