Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAretlookupcriteria(ref DataRow row, Aretlookupcriteria entity)
 {
     row.SetField("invno", entity.invno);
     row.SetField("invsuf", entity.invsuf);
     row.SetField("invsufsent", entity.invsufsent);
     row.SetField("invdt", entity.invdt);
     row.SetField("custno", entity.custno);
     row.SetField("transcd", entity.transcd);
     row.SetField("statustype", entity.statustype);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Aretlookupcriteria BuildAretlookupcriteriaFromRow(DataRow row)
        {
            Aretlookupcriteria entity = new Aretlookupcriteria();

            entity.invno            = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.invsuf           = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf");
            entity.invsufsent       = row.Field <bool>("invsufsent");
            entity.invdt            = row.Field <DateTime?>("invdt");
            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.transcd          = row.IsNull("transcd") ? 0 : row.Field <int>("transcd");
            entity.statustype       = row.Field <bool>("statustype");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }