Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArsptgetlistresults(ref DataRow row, Arsptgetlistresults entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("arscnotesfl", entity.arscnotesfl);
     row.SetField("shipto", entity.shipto);
     row.SetField("arssnotesfl", entity.arssnotesfl);
     row.SetField("custname", entity.custname);
     row.SetField("pricetype", entity.pricetype);
     row.SetField("sastadescrip", entity.sastadescrip);
     row.SetField("pricecd", entity.pricecd);
     row.SetField("disccd", entity.disccd);
     row.SetField("prclabel", entity.prclabel);
     row.SetField("prctydisplay", entity.prctydisplay);
     row.SetField("prclevdisplay", entity.prclevdisplay);
     row.SetField("disclevdisplay", entity.disclevdisplay);
     row.SetField("arsptrowid", entity.arsptrowid.ToByteArray());
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Arsptgetlistresults BuildArsptgetlistresultsFromRow(DataRow row)
        {
            Arsptgetlistresults entity = new Arsptgetlistresults();

            entity.custno         = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.arscnotesfl    = row.IsNull("arscnotesfl") ? string.Empty : row.Field <string>("arscnotesfl");
            entity.shipto         = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.arssnotesfl    = row.IsNull("arssnotesfl") ? string.Empty : row.Field <string>("arssnotesfl");
            entity.custname       = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.pricetype      = row.IsNull("pricetype") ? string.Empty : row.Field <string>("pricetype");
            entity.sastadescrip   = row.IsNull("sastadescrip") ? string.Empty : row.Field <string>("sastadescrip");
            entity.pricecd        = row.IsNull("pricecd") ? 0 : row.Field <int>("pricecd");
            entity.disccd         = row.IsNull("disccd") ? 0 : row.Field <int>("disccd");
            entity.prclabel       = row.IsNull("prclabel") ? string.Empty : row.Field <string>("prclabel");
            entity.prctydisplay   = row.IsNull("prctydisplay") ? string.Empty : row.Field <string>("prctydisplay");
            entity.prclevdisplay  = row.IsNull("prclevdisplay") ? 0 : row.Field <int>("prclevdisplay");
            entity.disclevdisplay = row.IsNull("disclevdisplay") ? 0 : row.Field <int>("disclevdisplay");
            entity.arsptrowid     = row.Field <byte[]>("arsptrowid").ToStringEncoded();
            entity.user1          = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2          = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3          = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4          = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5          = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6          = row.Field <decimal?>("user6");
            entity.user7          = row.Field <decimal?>("user7");
            entity.user8          = row.Field <DateTime?>("user8");
            entity.user9          = row.Field <DateTime?>("user9");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }