Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGetvendorcriteria(ref DataRow row, Getvendorcriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("vendor_id", entity.vendorId);
     row.SetField("vend_name", entity.vendName);
     row.SetField("contact_name", entity.contactName);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("getvendorcriteriauserfield", entity.getvendorcriteriauserfield);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Getvendorcriteria BuildGetvendorcriteriaFromRow(DataRow row)
        {
            Getvendorcriteria entity = new Getvendorcriteria();

            entity.coNum                      = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum                      = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.vendorId                   = row.IsNull("vendor_id") ? string.Empty : row.Field <string>("vendor_id");
            entity.vendName                   = row.IsNull("vend_name") ? string.Empty : row.Field <string>("vend_name");
            entity.contactName                = row.IsNull("contact_name") ? string.Empty : row.Field <string>("contact_name");
            entity.recordcountlimit           = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.getvendorcriteriauserfield = row.IsNull("getvendorcriteriauserfield") ? string.Empty : row.Field <string>("getvendorcriteriauserfield");
            entity.userfield                  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }