Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArstgetlistresults(ref DataRow row, Arstgetlistresults entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("custname", entity.custname);
     row.SetField("arscnotesfl", entity.arscnotesfl);
     row.SetField("shiptogrp", entity.shiptogrp);
     row.SetField("shiptogrpname", entity.shiptogrpname);
     row.SetField("arstrowid", entity.arstrowid.ToByteArray());
     row.SetField("arstrowpointer", entity.arstrowpointer);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Arstgetlistresults BuildArstgetlistresultsFromRow(DataRow row)
        {
            Arstgetlistresults entity = new Arstgetlistresults();

            entity.custno         = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custname       = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.arscnotesfl    = row.IsNull("arscnotesfl") ? string.Empty : row.Field <string>("arscnotesfl");
            entity.shiptogrp      = row.IsNull("shiptogrp") ? string.Empty : row.Field <string>("shiptogrp");
            entity.shiptogrpname  = row.IsNull("shiptogrpname") ? string.Empty : row.Field <string>("shiptogrpname");
            entity.arstrowid      = row.Field <byte[]>("arstrowid").ToStringEncoded();
            entity.arstrowpointer = row.IsNull("arstrowpointer") ? string.Empty : row.Field <string>("arstrowpointer");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }