Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWmbinassignment(ref DataRow row, Wmbinassignment entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("formtitletype", entity.formtitletype);
     row.SetField("createtitletype", entity.createtitletype);
     row.SetField("wmadjtype", entity.wmadjtype);
     row.SetField("returnfl", entity.returnfl);
     row.SetField("proofqty", entity.proofqty);
     row.SetField("proofqtyinit", entity.proofqtyinit);
     row.SetField("kprodty", entity.kprodty);
     row.SetField("kpprod", entity.kpprod);
     row.SetField("stockunit", entity.stockunit);
     row.SetField("buysellunit", entity.buysellunit);
     row.SetField("wmqtyship", entity.wmqtyship);
     row.SetField("wmqtyshipinit", entity.wmqtyshipinit);
     row.SetField("wmqtyrcv", entity.wmqtyrcv);
     row.SetField("wmqtyrcvinit", entity.wmqtyrcvinit);
     row.SetField("stkqtyship", entity.stkqtyship);
     row.SetField("stkqtyrcv", entity.stkqtyrcv);
     row.SetField("dPWStkQtyRcv", entity.dPWStkQtyRcv);
     row.SetField("kitfl", entity.kitfl);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("recordtype", entity.recordtype);
     row.SetField("record-rowid", entity.recordRowid.ToByteArray());
     row.SetField("whse", entity.whse);
     row.SetField("potype", entity.potype);
     row.SetField("autoassignenabled", entity.autoassignenabled);
     row.SetField("deallocateenabled", entity.deallocateenabled);
     row.SetField("UIUpdatesWMQty", entity.uIUpdatesWMQty);
     row.SetField("buysellqtyenabled", entity.buysellqtyenabled);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Wmbinassignment BuildWmbinassignmentFromRow(DataRow row)
        {
            Wmbinassignment entity = new Wmbinassignment();

            entity.prod              = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.formtitletype     = row.IsNull("formtitletype") ? string.Empty : row.Field <string>("formtitletype");
            entity.createtitletype   = row.IsNull("createtitletype") ? string.Empty : row.Field <string>("createtitletype");
            entity.wmadjtype         = row.IsNull("wmadjtype") ? string.Empty : row.Field <string>("wmadjtype");
            entity.returnfl          = row.Field <bool>("returnfl");
            entity.proofqty          = row.IsNull("proofqty") ? decimal.Zero : row.Field <decimal>("proofqty");
            entity.proofqtyinit      = row.IsNull("proofqtyinit") ? decimal.Zero : row.Field <decimal>("proofqtyinit");
            entity.kprodty           = row.IsNull("kprodty") ? string.Empty : row.Field <string>("kprodty");
            entity.kpprod            = row.IsNull("kpprod") ? string.Empty : row.Field <string>("kpprod");
            entity.stockunit         = row.IsNull("stockunit") ? string.Empty : row.Field <string>("stockunit");
            entity.buysellunit       = row.IsNull("buysellunit") ? string.Empty : row.Field <string>("buysellunit");
            entity.wmqtyship         = row.IsNull("wmqtyship") ? decimal.Zero : row.Field <decimal>("wmqtyship");
            entity.wmqtyshipinit     = row.IsNull("wmqtyshipinit") ? decimal.Zero : row.Field <decimal>("wmqtyshipinit");
            entity.wmqtyrcv          = row.IsNull("wmqtyrcv") ? decimal.Zero : row.Field <decimal>("wmqtyrcv");
            entity.wmqtyrcvinit      = row.IsNull("wmqtyrcvinit") ? decimal.Zero : row.Field <decimal>("wmqtyrcvinit");
            entity.stkqtyship        = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship");
            entity.stkqtyrcv         = row.IsNull("stkqtyrcv") ? decimal.Zero : row.Field <decimal>("stkqtyrcv");
            entity.dPWStkQtyRcv      = row.IsNull("dPWStkQtyRcv") ? decimal.Zero : row.Field <decimal>("dPWStkQtyRcv");
            entity.kitfl             = row.Field <bool>("kitfl");
            entity.ordertype         = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.recordtype        = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.recordRowid       = row.Field <byte[]>("record-rowid").ToStringEncoded();
            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.potype            = row.IsNull("potype") ? string.Empty : row.Field <string>("potype");
            entity.autoassignenabled = row.Field <bool>("autoassignenabled");
            entity.deallocateenabled = row.Field <bool>("deallocateenabled");
            entity.uIUpdatesWMQty    = row.Field <bool>("UIUpdatesWMQty");
            entity.buysellqtyenabled = row.Field <bool>("buysellqtyenabled");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }