示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOetallycomponent(ref DataRow row, Oetallycomponent entity)
 {
     row.SetField("lRandomMix", entity.lRandomMix);
     row.SetField("cMode", entity.cMode);
     row.SetField("cProd", entity.cProd);
     row.SetField("iQtyOrd", entity.iQtyOrd);
     row.SetField("lCancel", entity.lCancel);
     row.SetField("cWhse", entity.cWhse);
     row.SetField("cTallyProd", entity.cTallyProd);
     row.SetField("lMemoMix", entity.lMemoMix);
     row.SetField("iLength", entity.iLength);
     row.SetField("iICSpecRecNo", entity.iICSpecRecNo);
     row.SetField("iQtyShip", entity.iQtyShip);
     row.SetField("lDelayResrvFl", entity.lDelayResrvFl);
     row.SetField("proddesc", entity.proddesc);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("compseqno", entity.compseqno);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Oetallycomponent BuildOetallycomponentFromRow(DataRow row)
        {
            Oetallycomponent entity = new Oetallycomponent();

            entity.lRandomMix      = row.Field <bool>("lRandomMix");
            entity.cMode           = row.IsNull("cMode") ? string.Empty : row.Field <string>("cMode");
            entity.cProd           = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd");
            entity.iQtyOrd         = row.IsNull("iQtyOrd") ? 0 : row.Field <int>("iQtyOrd");
            entity.lCancel         = row.Field <bool>("lCancel");
            entity.cWhse           = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse");
            entity.cTallyProd      = row.IsNull("cTallyProd") ? string.Empty : row.Field <string>("cTallyProd");
            entity.lMemoMix        = row.Field <bool>("lMemoMix");
            entity.iLength         = row.IsNull("iLength") ? 0 : row.Field <int>("iLength");
            entity.iICSpecRecNo    = row.IsNull("iICSpecRecNo") ? 0 : row.Field <int>("iICSpecRecNo");
            entity.iQtyShip        = row.IsNull("iQtyShip") ? 0 : row.Field <int>("iQtyShip");
            entity.lDelayResrvFl   = row.Field <bool>("lDelayResrvFl");
            entity.proddesc        = row.IsNull("proddesc") ? string.Empty : row.Field <string>("proddesc");
            entity.qtyavail        = row.IsNull("qtyavail") ? decimal.Zero : row.Field <decimal>("qtyavail");
            entity.compseqno       = row.IsNull("compseqno") ? 0 : row.Field <int>("compseqno");
            entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.tariffcd        = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }