Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGetvendorresults(ref DataRow row, Getvendorresults entity)
 {
     row.SetField("vendor_id", entity.vendorId);
     row.SetField("vend_name", entity.vendName);
     row.SetField("contact_name", entity.contactName);
     row.SetField("venmstrowid", entity.venmstrowid.ToByteArray());
     row.SetField("getvendorresultsuserfield", entity.getvendorresultsuserfield);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Getvendorresults BuildGetvendorresultsFromRow(DataRow row)
        {
            Getvendorresults entity = new Getvendorresults();

            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.venmstrowid = row.Field <byte[]>("venmstrowid").ToStringEncoded();
            entity.getvendorresultsuserfield = row.IsNull("getvendorresultsuserfield") ? string.Empty : row.Field <string>("getvendorresultsuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }