コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeirorderlistcriteria(ref DataRow row, Oeirorderlistcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("whse", entity.whse);
     row.SetField("stagecd", entity.stagecd);
     row.SetField("creditmgr", entity.creditmgr);
     row.SetField("begindt", entity.begindt);
     row.SetField("enddt", entity.enddt);
     row.SetField("approvty", entity.approvty);
     row.SetField("approvintlty", entity.approvintlty);
     row.SetField("type", entity.type);
     row.SetField("shipvia", entity.shipvia);
     row.SetField("boonlyfl", entity.boonlyfl);
     row.SetField("shippedqtyfl", entity.shippedqtyfl);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Oeirorderlistcriteria BuildOeirorderlistcriteriaFromRow(DataRow row)
        {
            Oeirorderlistcriteria entity = new Oeirorderlistcriteria();

            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto           = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.orderno          = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf         = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.whse             = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.stagecd          = row.IsNull("stagecd") ? string.Empty : row.Field <string>("stagecd");
            entity.creditmgr        = row.IsNull("creditmgr") ? string.Empty : row.Field <string>("creditmgr");
            entity.begindt          = row.Field <DateTime?>("begindt");
            entity.enddt            = row.Field <DateTime?>("enddt");
            entity.approvty         = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            entity.approvintlty     = row.IsNull("approvintlty") ? string.Empty : row.Field <string>("approvintlty");
            entity.type             = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.shipvia          = row.IsNull("shipvia") ? string.Empty : row.Field <string>("shipvia");
            entity.boonlyfl         = row.Field <bool>("boonlyfl");
            entity.shippedqtyfl     = row.Field <bool>("shippedqtyfl");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }