Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeetassemblyinfosingle(ref DataRow row, Oeetassemblyinfosingle entity)
 {
     row.SetField("preassemblylength", entity.preassemblylength);
     row.SetField("preassemblylengthvisible", entity.preassemblylengthvisible);
     row.SetField("qtytobuild", entity.qtytobuild);
     row.SetField("prod", entity.prod);
     row.SetField("displaywhse", entity.displaywhse);
     row.SetField("assemblyunit", entity.assemblyunit);
     row.SetField("whsedesc", entity.whsedesc);
     row.SetField("whse", entity.whse);
     row.SetField("assemblytype", entity.assemblytype);
     row.SetField("verno", entity.verno);
     row.SetField("lastverno", entity.lastverno);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Oeetassemblyinfosingle BuildOeetassemblyinfosingleFromRow(DataRow row)
        {
            Oeetassemblyinfosingle entity = new Oeetassemblyinfosingle();

            entity.preassemblylength        = row.IsNull("preassemblylength") ? decimal.Zero : row.Field <decimal>("preassemblylength");
            entity.preassemblylengthvisible = row.Field <bool>("preassemblylengthvisible");
            entity.qtytobuild   = row.IsNull("qtytobuild") ? decimal.Zero : row.Field <decimal>("qtytobuild");
            entity.prod         = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.displaywhse  = row.IsNull("displaywhse") ? string.Empty : row.Field <string>("displaywhse");
            entity.assemblyunit = row.IsNull("assemblyunit") ? string.Empty : row.Field <string>("assemblyunit");
            entity.whsedesc     = row.IsNull("whsedesc") ? string.Empty : row.Field <string>("whsedesc");
            entity.whse         = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.assemblytype = row.IsNull("assemblytype") ? string.Empty : row.Field <string>("assemblytype");
            entity.verno        = row.IsNull("verno") ? 0 : row.Field <int>("verno");
            entity.lastverno    = row.IsNull("lastverno") ? 0 : row.Field <int>("lastverno");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }