コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCrtbundleidrcdscriteria(ref DataRow row, Crtbundleidrcdscriteria entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("unitconv", entity.unitconv);
     row.SetField("customparam", entity.customparam);
 }
コード例 #2
0
        public static Crtbundleidrcdscriteria BuildCrtbundleidrcdscriteriaFromRow(DataRow row)
        {
            Crtbundleidrcdscriteria entity = new Crtbundleidrcdscriteria();

            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.ordertype   = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.orderno     = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf    = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.lineno      = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.unitconv    = row.IsNull("unitconv") ? decimal.Zero : row.Field <decimal>("unitconv");
            entity.customparam = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam");
            return(entity);
        }