Exemplo n.º 1
0
        public static Icearsingle BuildIcearsingleFromRow(DataRow row)
        {
            Icearsingle entity = new Icearsingle();

            entity.orderty         = row.IsNull("orderty") ? string.Empty : row.Field <string>("orderty");
            entity.inoutfl         = row.IsNull("inoutfl") ? string.Empty : row.Field <string>("inoutfl");
            entity.orderno         = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf        = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.stagecd         = row.IsNull("stagecd") ? 0 : row.Field <int>("stagecd");
            entity.stage           = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.notesfl         = row.IsNull("notesfl") ? string.Empty : row.Field <string>("notesfl");
            entity.lineno          = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.seqno           = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.date            = row.Field <DateTime?>("date");
            entity.transty         = row.IsNull("transty") ? string.Empty : row.Field <string>("transty");
            entity.qtyord          = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.stkqtyord       = row.IsNull("stkqtyord") ? decimal.Zero : row.Field <decimal>("stkqtyord");
            entity.qtyship         = row.IsNull("qtyship") ? decimal.Zero : row.Field <decimal>("qtyship");
            entity.stkqtyship      = row.IsNull("stkqtyship") ? decimal.Zero : row.Field <decimal>("stkqtyship");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.unitconv        = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.delayresrvfl    = row.Field <bool>("delayresrvfl");
            entity.qtyorddisp      = row.IsNull("qtyorddisp") ? decimal.Zero : row.Field <decimal>("qtyorddisp");
            entity.qtyshpdisp      = row.IsNull("qtyshpdisp") ? decimal.Zero : row.Field <decimal>("qtyshpdisp");
            entity.origqtyshpdisp  = row.IsNull("origqtyshpdisp") ? decimal.Zero : row.Field <decimal>("origqtyshpdisp");
            entity.prevqtyshpdisp  = row.IsNull("prevqtyshpdisp") ? decimal.Zero : row.Field <decimal>("prevqtyshpdisp");
            entity.lchangefl       = row.Field <bool>("lchangefl");
            entity.uomfl           = row.Field <bool>("uomfl");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.kittype         = row.IsNull("kittype") ? string.Empty : row.Field <string>("kittype");
            entity.wllivefl        = row.Field <bool>("wllivefl");
            entity.wlwhsefl        = row.Field <bool>("wlwhsefl");
            entity.wlrcvonlyfl     = row.Field <bool>("wlrcvonlyfl");
            entity.wlesbfl         = row.Field <bool>("wlesbfl");
            entity.gave8751warn    = row.Field <bool>("gave8751warn");
            entity.qtyshipupdatefl = row.Field <bool>("qtyshipupdatefl");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcearsingle(ref DataRow row, Icearsingle entity)
 {
     row.SetField("orderty", entity.orderty);
     row.SetField("inoutfl", entity.inoutfl);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("stage", entity.stage);
     row.SetField("notesfl", entity.notesfl);
     row.SetField("lineno", entity.lineno);
     row.SetField("seqno", entity.seqno);
     row.SetField("date", entity.date);
     row.SetField("transty", entity.transty);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("stkqtyord", entity.stkqtyord);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("stkqtyship", entity.stkqtyship);
     row.SetField("unit", entity.unit);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("delayresrvfl", entity.delayresrvfl);
     row.SetField("qtyorddisp", entity.qtyorddisp);
     row.SetField("qtyshpdisp", entity.qtyshpdisp);
     row.SetField("origqtyshpdisp", entity.origqtyshpdisp);
     row.SetField("prevqtyshpdisp", entity.prevqtyshpdisp);
     row.SetField("lchangefl", entity.lchangefl);
     row.SetField("uomfl", entity.uomfl);
     row.SetField("custno", entity.custno);
     row.SetField("kittype", entity.kittype);
     row.SetField("wllivefl", entity.wllivefl);
     row.SetField("wlwhsefl", entity.wlwhsefl);
     row.SetField("wlrcvonlyfl", entity.wlrcvonlyfl);
     row.SetField("wlesbfl", entity.wlesbfl);
     row.SetField("gave8751warn", entity.gave8751warn);
     row.SetField("qtyshipupdatefl", entity.qtyshipupdatefl);
     row.SetField("userfield", entity.userfield);
 }