Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArsoaddresults(ref DataRow row, Arsoaddresults entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("custtype", entity.custtype);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("catdesc", entity.catdesc);
     row.SetField("arso-rowid", entity.arsoRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Arsoaddresults BuildArsoaddresultsFromRow(DataRow row)
        {
            Arsoaddresults entity = new Arsoaddresults();

            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custtype  = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype");
            entity.prodcat   = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.catdesc   = row.IsNull("catdesc") ? string.Empty : row.Field <string>("catdesc");
            entity.arsoRowid = row.Field <byte[]>("arso-rowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }