Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVendorshipfromcriteria(ref DataRow row, Vendorshipfromcriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("vendor_id", entity.vendorId);
     row.SetField("edi_code", entity.ediCode);
     row.SetField("contact_name", entity.contactName);
     row.SetField("city", entity.city);
     row.SetField("state", entity.state);
     row.SetField("zip", entity.zip);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("vendorshipfromcriteriauserfield", entity.vendorshipfromcriteriauserfield);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Vendorshipfromcriteria BuildVendorshipfromcriteriaFromRow(DataRow row)
        {
            Vendorshipfromcriteria entity = new Vendorshipfromcriteria();

            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.ediCode          = row.IsNull("edi_code") ? string.Empty : row.Field <string>("edi_code");
            entity.contactName      = row.IsNull("contact_name") ? string.Empty : row.Field <string>("contact_name");
            entity.city             = row.IsNull("city") ? string.Empty : row.Field <string>("city");
            entity.state            = row.IsNull("state") ? string.Empty : row.Field <string>("state");
            entity.zip              = row.IsNull("zip") ? string.Empty : row.Field <string>("zip");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.vendorshipfromcriteriauserfield = row.IsNull("vendorshipfromcriteriauserfield") ? string.Empty : row.Field <string>("vendorshipfromcriteriauserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }