Example #1
0
        public static Wmsbsearchresults BuildWmsbsearchresultsFromRow(DataRow row)
        {
            Wmsbsearchresults entity = new Wmsbsearchresults();

            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.binloc      = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.assigncode  = row.IsNull("assigncode") ? string.Empty : row.Field <string>("assigncode");
            entity.binheight   = row.IsNull("binheight") ? decimal.Zero : row.Field <decimal>("binheight");
            entity.binlength   = row.IsNull("binlength") ? decimal.Zero : row.Field <decimal>("binlength");
            entity.bintype     = row.IsNull("bintype") ? string.Empty : row.Field <string>("bintype");
            entity.binwidth    = row.IsNull("binwidth") ? decimal.Zero : row.Field <decimal>("binwidth");
            entity.building    = row.IsNull("building") ? string.Empty : row.Field <string>("building");
            entity.cubes       = row.IsNull("cubes") ? decimal.Zero : row.Field <decimal>("cubes");
            entity.descrip     = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.fstoredt    = row.Field <DateTime?>("fstoredt");
            entity.lpickdt     = row.Field <DateTime?>("lpickdt");
            entity.lstoredt    = row.Field <DateTime?>("lstoredt");
            entity.operinit    = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.pounittype  = row.IsNull("pounittype") ? string.Empty : row.Field <string>("pounittype");
            entity.priority    = row.IsNull("priority") ? 0 : row.Field <int>("priority");
            entity.sizetype    = row.IsNull("sizetype") ? string.Empty : row.Field <string>("sizetype");
            entity.statuscode  = row.IsNull("statuscode") ? string.Empty : row.Field <string>("statuscode");
            entity.tmpicked    = row.IsNull("tmpicked") ? 0 : row.Field <int>("tmpicked");
            entity.tmstored    = row.IsNull("tmstored") ? 0 : row.Field <int>("tmstored");
            entity.transdt     = row.Field <DateTime?>("transdt");
            entity.transproc   = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc");
            entity.transtm     = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            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.rowid       = row.Field <byte[]>("rowid").ToStringEncoded();
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.restrict    = row.IsNull("restrict") ? string.Empty : row.Field <string>("restrict");
            entity.restrictbld = row.IsNull("restrictbld") ? string.Empty : row.Field <string>("restrictbld");
            entity.restrictrow = row.IsNull("restrictrow") ? string.Empty : row.Field <string>("restrictrow");
            entity.productcnt  = row.IsNull("productcnt") ? 0 : row.Field <int>("productcnt");
            return(entity);
        }
Example #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWmsbsearchresults(ref DataRow row, Wmsbsearchresults entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("binloc", entity.binloc);
     row.SetField("assigncode", entity.assigncode);
     row.SetField("binheight", entity.binheight);
     row.SetField("binlength", entity.binlength);
     row.SetField("bintype", entity.bintype);
     row.SetField("binwidth", entity.binwidth);
     row.SetField("building", entity.building);
     row.SetField("cubes", entity.cubes);
     row.SetField("descrip", entity.descrip);
     row.SetField("fstoredt", entity.fstoredt);
     row.SetField("lpickdt", entity.lpickdt);
     row.SetField("lstoredt", entity.lstoredt);
     row.SetField("operinit", entity.operinit);
     row.SetField("pounittype", entity.pounittype);
     row.SetField("priority", entity.priority);
     row.SetField("sizetype", entity.sizetype);
     row.SetField("statuscode", entity.statuscode);
     row.SetField("tmpicked", entity.tmpicked);
     row.SetField("tmstored", entity.tmstored);
     row.SetField("transdt", entity.transdt);
     row.SetField("transproc", entity.transproc);
     row.SetField("transtm", entity.transtm);
     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("rowid", entity.rowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
     row.SetField("restrict", entity.restrict);
     row.SetField("restrictbld", entity.restrictbld);
     row.SetField("restrictrow", entity.restrictrow);
     row.SetField("productcnt", entity.productcnt);
 }