Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromAoarscl(ref DataRow row, Aoarscl entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("custno", entity.custno);
     row.SetField("custname", entity.custname);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("pricetypedesc", entity.pricetypedesc);
     row.SetField("arscl-rowid", entity.arsclRowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Aoarscl BuildAoarsclFromRow(DataRow row)
        {
            Aoarscl entity = new Aoarscl();

            entity.cono          = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custname      = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.pricetype     = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.pricetypedesc = row.IsNull("pricetypedesc") ? string.Empty : row.Field <string>("pricetypedesc");
            entity.arsclRowid    = row.Field <byte[]>("arscl-rowid").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }