コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelineicspcresults(ref DataRow row, Oelineicspcresults entity)
 {
     row.SetField("selectedfl", entity.selectedfl);
     row.SetField("origselectedfl", entity.origselectedfl);
     row.SetField("cono", entity.cono);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("startdt", entity.startdt);
     row.SetField("expiredt", entity.expiredt);
     row.SetField("refer", entity.refer);
     row.SetField("contractno", entity.contractno);
     row.SetField("name", entity.name);
     row.SetField("availqty", entity.availqty);
     row.SetField("allowpullqtyfl", entity.allowpullqtyfl);
     row.SetField("whse", entity.whse);
     row.SetField("icspc-rowpointer", entity.icspcRowpointer);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("recordtype", entity.recordtype);
     row.SetField("icsp-rowpointer", entity.icspRowpointer);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Oelineicspcresults BuildOelineicspcresultsFromRow(DataRow row)
        {
            Oelineicspcresults entity = new Oelineicspcresults();

            entity.selectedfl      = row.Field <bool>("selectedfl");
            entity.origselectedfl  = row.Field <bool>("origselectedfl");
            entity.cono            = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.custno          = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto          = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.startdt         = row.Field <DateTime?>("startdt");
            entity.expiredt        = row.Field <DateTime?>("expiredt");
            entity.refer           = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.contractno      = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.name            = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.availqty        = row.IsNull("availqty") ? decimal.Zero : row.Field <decimal>("availqty");
            entity.allowpullqtyfl  = row.Field <bool>("allowpullqtyfl");
            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.icspcRowpointer = row.IsNull("icspc-rowpointer") ? string.Empty : row.Field <string>("icspc-rowpointer");
            entity.srcrowpointer   = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.recordtype      = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.icspRowpointer  = row.IsNull("icsp-rowpointer") ? string.Empty : row.Field <string>("icsp-rowpointer");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }