示例#1
0
        public static Icewupdate BuildIcewupdateFromRow(DataRow row)
        {
            Icewupdate entity = new Icewupdate();

            entity.jrnlno       = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.fromwhse     = row.IsNull("fromwhse") ? string.Empty : row.Field <string>("fromwhse");
            entity.towhse       = row.IsNull("towhse") ? string.Empty : row.Field <string>("towhse");
            entity.prod         = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.stkqtyship   = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship");
            entity.gPostdt      = row.Field <DateTime?>("g-postdt");
            entity.refer        = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.unavailfl    = row.Field <bool>("unavailfl");
            entity.reasunavty   = row.IsNull("reasunavty") ? string.Empty : row.Field <string>("reasunavty");
            entity.serlottype   = row.IsNull("serlottype") ? string.Empty : row.Field <string>("serlottype");
            entity.nosnots      = row.IsNull("nosnots") ? decimal.Zero : row.Field <decimal>("nosnots");
            entity.orderno      = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf     = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno       = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.launchfl     = row.Field <bool>("launchfl");
            entity.updatefl     = row.Field <bool>("updatefl");
            entity.sericsnpofl  = row.Field <bool>("sericsnpofl");
            entity.icspproddesc = row.IsNull("icspproddesc") ? string.Empty : row.Field <string>("icspproddesc");
            entity.icspecrecno  = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
示例#2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcewupdate(ref DataRow row, Icewupdate entity)
 {
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("fromwhse", entity.fromwhse);
     row.SetField("towhse", entity.towhse);
     row.SetField("prod", entity.prod);
     row.SetField("stkqtyship", entity.stkqtyship);
     row.SetField("g-postdt", entity.gPostdt);
     row.SetField("refer", entity.refer);
     row.SetField("unavailfl", entity.unavailfl);
     row.SetField("reasunavty", entity.reasunavty);
     row.SetField("serlottype", entity.serlottype);
     row.SetField("nosnots", entity.nosnots);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("launchfl", entity.launchfl);
     row.SetField("updatefl", entity.updatefl);
     row.SetField("sericsnpofl", entity.sericsnpofl);
     row.SetField("icspproddesc", entity.icspproddesc);
     row.SetField("icspecrecno", entity.icspecrecno);
     row.SetField("userfield", entity.userfield);
 }