/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPocoreallocationcriteria(ref DataRow row, Pocoreallocationcriteria entity) { row.SetField("iPONo", entity.iPONo); row.SetField("iPOSuf", entity.iPOSuf); row.SetField("iLineno", entity.iLineno); row.SetField("cProd", entity.cProd); row.SetField("dVendNo", entity.dVendNo); row.SetField("cWhse", entity.cWhse); row.SetField("iImplyQty", entity.iImplyQty); row.SetField("iSecure", entity.iSecure); row.SetField("cOurProc", entity.cOurProc); row.SetField("lZeroProofReq", entity.lZeroProofReq); row.SetField("dQtyRcv", entity.dQtyRcv); row.SetField("dStkQtyRcv", entity.dStkQtyRcv); row.SetField("dPrice", entity.dPrice); row.SetField("lWarrantyFl", entity.lWarrantyFl); row.SetField("cSpecCostTy", entity.cSpecCostTy); row.SetField("dUnitConv", entity.dUnitConv); row.SetField("cCustomParam", entity.cCustomParam); row.SetField("userfield", entity.userfield); }
public static Pocoreallocationcriteria BuildPocoreallocationcriteriaFromRow(DataRow row) { Pocoreallocationcriteria entity = new Pocoreallocationcriteria(); entity.iPONo = row.IsNull("iPONo") ? 0 : row.Field <int>("iPONo"); entity.iPOSuf = row.IsNull("iPOSuf") ? 0 : row.Field <int>("iPOSuf"); entity.iLineno = row.IsNull("iLineno") ? 0 : row.Field <int>("iLineno"); entity.cProd = row.IsNull("cProd") ? string.Empty : row.Field <string>("cProd"); entity.dVendNo = row.IsNull("dVendNo") ? decimal.Zero : row.Field <decimal>("dVendNo"); entity.cWhse = row.IsNull("cWhse") ? string.Empty : row.Field <string>("cWhse"); entity.iImplyQty = row.IsNull("iImplyQty") ? 0 : row.Field <int>("iImplyQty"); entity.iSecure = row.IsNull("iSecure") ? 0 : row.Field <int>("iSecure"); entity.cOurProc = row.IsNull("cOurProc") ? string.Empty : row.Field <string>("cOurProc"); entity.lZeroProofReq = row.Field <bool>("lZeroProofReq"); entity.dQtyRcv = row.IsNull("dQtyRcv") ? decimal.Zero : row.Field <decimal>("dQtyRcv"); entity.dStkQtyRcv = row.IsNull("dStkQtyRcv") ? decimal.Zero : row.Field <decimal>("dStkQtyRcv"); entity.dPrice = row.IsNull("dPrice") ? decimal.Zero : row.Field <decimal>("dPrice"); entity.lWarrantyFl = row.Field <bool>("lWarrantyFl"); entity.cSpecCostTy = row.IsNull("cSpecCostTy") ? string.Empty : row.Field <string>("cSpecCostTy"); entity.dUnitConv = row.IsNull("dUnitConv") ? decimal.Zero : row.Field <decimal>("dUnitConv"); entity.cCustomParam = row.IsNull("cCustomParam") ? string.Empty : row.Field <string>("cCustomParam"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }