Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWmbinassignmenttrans(ref DataRow row, Wmbinassignmenttrans entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("binloc", entity.binloc);
     row.SetField("stockqty", entity.stockqty);
     row.SetField("stockqtyprev", entity.stockqtyprev);
     row.SetField("stockqtyorig", entity.stockqtyorig);
     row.SetField("stockunit", entity.stockunit);
     row.SetField("buysellqty", entity.buysellqty);
     row.SetField("buysellqtyprev", entity.buysellqtyprev);
     row.SetField("buysellunit", entity.buysellunit);
     row.SetField("convv", entity.convv);
     row.SetField("cerrormessage", entity.cerrormessage);
     row.SetField("buysellqtyenabled", entity.buysellqtyenabled);
     row.SetField("wmetrowid", entity.wmetrowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Wmbinassignmenttrans BuildWmbinassignmenttransFromRow(DataRow row)
        {
            Wmbinassignmenttrans entity = new Wmbinassignmenttrans();

            entity.whse              = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod              = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.binloc            = row.IsNull("binloc") ? string.Empty : row.Field <string>("binloc");
            entity.stockqty          = row.IsNull("stockqty") ? decimal.Zero : row.Field <decimal>("stockqty");
            entity.stockqtyprev      = row.IsNull("stockqtyprev") ? decimal.Zero : row.Field <decimal>("stockqtyprev");
            entity.stockqtyorig      = row.IsNull("stockqtyorig") ? decimal.Zero : row.Field <decimal>("stockqtyorig");
            entity.stockunit         = row.IsNull("stockunit") ? string.Empty : row.Field <string>("stockunit");
            entity.buysellqty        = row.IsNull("buysellqty") ? decimal.Zero : row.Field <decimal>("buysellqty");
            entity.buysellqtyprev    = row.IsNull("buysellqtyprev") ? decimal.Zero : row.Field <decimal>("buysellqtyprev");
            entity.buysellunit       = row.IsNull("buysellunit") ? string.Empty : row.Field <string>("buysellunit");
            entity.convv             = row.IsNull("convv") ? decimal.Zero : row.Field <decimal>("convv");
            entity.cerrormessage     = row.IsNull("cerrormessage") ? string.Empty : row.Field <string>("cerrormessage");
            entity.buysellqtyenabled = row.Field <bool>("buysellqtyenabled");
            entity.wmetrowid         = row.Field <byte[]>("wmetrowid").ToStringEncoded();
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }