コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpolinehistoryresults(ref DataRow row, Loadpolinehistoryresults entity)
 {
     row.SetField("posuf", entity.posuf);
     row.SetField("cStage", entity.cStage);
     row.SetField("orderdt", entity.orderdt);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("paiddt", entity.paiddt);
     row.SetField("unit", entity.unit);
     row.SetField("dtCosted", entity.dtCosted);
     row.SetField("lAssign", entity.lAssign);
     row.SetField("dQtyOrdered", entity.dQtyOrdered);
     row.SetField("dQtyReceived", entity.dQtyReceived);
     row.SetField("lCorrectionTy", entity.lCorrectionTy);
     row.SetField("ncnr", entity.ncnr);
     row.SetField("countryoforigin", entity.countryoforigin);
     row.SetField("tariffcd", entity.tariffcd);
     row.SetField("dutyrate", entity.dutyrate);
     row.SetField("upcid", entity.upcid);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Loadpolinehistoryresults BuildLoadpolinehistoryresultsFromRow(DataRow row)
        {
            Loadpolinehistoryresults entity = new Loadpolinehistoryresults();

            entity.posuf           = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.cStage          = row.IsNull("cStage") ? string.Empty : row.Field <string>("cStage");
            entity.orderdt         = row.Field <DateTime?>("orderdt");
            entity.receiptdt       = row.Field <DateTime?>("receiptdt");
            entity.paiddt          = row.Field <DateTime?>("paiddt");
            entity.unit            = row.IsNull("unit") ? string.Empty : row.Field <string>("unit");
            entity.dtCosted        = row.Field <DateTime?>("dtCosted");
            entity.lAssign         = row.Field <bool>("lAssign");
            entity.dQtyOrdered     = row.IsNull("dQtyOrdered") ? decimal.Zero : row.Field <decimal>("dQtyOrdered");
            entity.dQtyReceived    = row.IsNull("dQtyReceived") ? decimal.Zero : row.Field <decimal>("dQtyReceived");
            entity.lCorrectionTy   = row.Field <bool>("lCorrectionTy");
            entity.ncnr            = row.IsNull("ncnr") ? string.Empty : row.Field <string>("ncnr");
            entity.countryoforigin = row.IsNull("countryoforigin") ? string.Empty : row.Field <string>("countryoforigin");
            entity.tariffcd        = row.IsNull("tariffcd") ? string.Empty : row.Field <string>("tariffcd");
            entity.dutyrate        = row.IsNull("dutyrate") ? decimal.Zero : row.Field <decimal>("dutyrate");
            entity.upcid           = row.IsNull("upcid") ? string.Empty : row.Field <string>("upcid");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }