Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspvendcontupdcriteria(ref DataRow row, Pdspvendcontupdcriteria entity)
 {
     row.SetField("cLevelcd", entity.cLevelcd);
     row.SetField("iRecno", entity.iRecno);
     row.SetField("enddt", entity.enddt);
     row.SetField("statusfl", entity.statusfl);
     row.SetField("reference", entity.reference);
     row.SetField("quoteid", entity.quoteid);
     row.SetField("contractpr", entity.contractpr);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("maxqty", entity.maxqty);
     row.SetField("actqty", entity.actqty);
     row.SetField("maxqtyty", entity.maxqtyty);
     row.SetField("hardmaxfl", entity.hardmaxfl);
     row.SetField("qtytype", entity.qtytype);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Pdspvendcontupdcriteria BuildPdspvendcontupdcriteriaFromRow(DataRow row)
        {
            Pdspvendcontupdcriteria entity = new Pdspvendcontupdcriteria();

            entity.cLevelcd   = row.IsNull("cLevelcd") ? string.Empty : row.Field <string>("cLevelcd");
            entity.iRecno     = row.IsNull("iRecno") ? 0 : row.Field <int>("iRecno");
            entity.enddt      = row.Field <DateTime?>("enddt");
            entity.statusfl   = row.Field <bool>("statusfl");
            entity.reference  = row.IsNull("reference") ? string.Empty : row.Field <string>("reference");
            entity.quoteid    = row.IsNull("quoteid") ? string.Empty : row.Field <string>("quoteid");
            entity.contractpr = row.IsNull("contractpr") ? decimal.Zero : row.Field <decimal>("contractpr");
            entity.custno     = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto     = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.maxqty     = row.IsNull("maxqty") ? decimal.Zero : row.Field <decimal>("maxqty");
            entity.actqty     = row.IsNull("actqty") ? decimal.Zero : row.Field <decimal>("actqty");
            entity.maxqtyty   = row.IsNull("maxqtyty") ? string.Empty : row.Field <string>("maxqtyty");
            entity.hardmaxfl  = row.Field <bool>("hardmaxfl");
            entity.qtytype    = row.IsNull("qtytype") ? string.Empty : row.Field <string>("qtytype");
            entity.user1      = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2      = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3      = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4      = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5      = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6      = row.Field <decimal?>("user6");
            entity.user7      = row.Field <decimal?>("user7");
            entity.user8      = row.Field <DateTime?>("user8");
            entity.user9      = row.Field <DateTime?>("user9");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }