Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpocostactresults(ref DataRow row, Loadpocostactresults entity)
 {
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("compseqno", entity.compseqno);
     row.SetField("shipprod", entity.shipprod);
     row.SetField("cProdNotesFl", entity.cProdNotesFl);
     row.SetField("cQtyCosted", entity.cQtyCosted);
     row.SetField("cCost", entity.cCost);
     row.SetField("discount", entity.discount);
     row.SetField("addonamt", entity.addonamt);
     row.SetField("cNetAmt", entity.cNetAmt);
     row.SetField("bundleid", entity.bundleid);
 }
Exemple #2
0
        public static Loadpocostactresults BuildLoadpocostactresultsFromRow(DataRow row)
        {
            Loadpocostactresults entity = new Loadpocostactresults();

            entity.jrnlno       = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno        = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.compseqno    = row.IsNull("compseqno") ? 0 : row.Field <int>("compseqno");
            entity.shipprod     = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.cProdNotesFl = row.IsNull("cProdNotesFl") ? string.Empty : row.Field <string>("cProdNotesFl");
            entity.cQtyCosted   = row.IsNull("cQtyCosted") ? string.Empty : row.Field <string>("cQtyCosted");
            entity.cCost        = row.IsNull("cCost") ? string.Empty : row.Field <string>("cCost");
            entity.discount     = row.IsNull("discount") ? decimal.Zero : row.Field <decimal>("discount");
            entity.addonamt     = row.IsNull("addonamt") ? decimal.Zero : row.Field <decimal>("addonamt");
            entity.cNetAmt      = row.IsNull("cNetAmt") ? string.Empty : row.Field <string>("cNetAmt");
            entity.bundleid     = row.IsNull("bundleid") ? string.Empty : row.Field <string>("bundleid");
            return(entity);
        }