コード例 #1
0
        /// <summary>
        /// 根据query获取选项值
        /// </summary>
        /// <param name="mode"></param>
        /// <param name="callback"></param>
        public void GetProductAccessoriesConditionValueByQuery(ProductAccessoriesConditionValueQueryVM mode, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            ProductAccessoriesConditionValueQueryFilter query = new ProductAccessoriesConditionValueQueryFilter()
            {
                ConditionSysNo = mode.Condition.SysNo,
                ConditionValue = mode.ConditionValue.ConditionValue,
                MasterSysNo    = mode.MasterSysNo,
                PagingInfo     = new PagingInfo()
                {
                    PageIndex = PageIndex,
                    PageSize  = PageSize,
                    SortBy    = SortField
                }
            };

            restClient.QueryDynamicData(GetProductAccessoriesConditionValueByQueryUrl, query, callback);
        }
 public ProductAccessoriesQueryConditionValueMaintain()
 {
     InitializeComponent();
     ConditionValueSetResult.LoadingDataSource += new EventHandler <LoadingDataEventArgs>(ConditionValueSetResult_LoadingDataSource);
     this.Loaded += (sender, e) =>
     {
         model         = new ProductAccessoriesConditionValueQueryVM();
         ConditionList = new List <AccessoriesQueryCondition>()
         {
             new AccessoriesQueryCondition()
             {
                 ConditionName = "--全部--", SysNo = 0
             }
         };
         model.MasterSysNo = MaterSysNo;
         facade            = new ProductAccessoriesFacade();
         facade.GetAccessoriesQueryConditionBySysNo(MaterSysNo, (obj, arg) =>
         {
             if (arg.FaultsHandle())
             {
                 return;
             }
             dynamic d = arg.Result.Rows;
             foreach (var item in d)
             {
                 ConditionList.Add(new AccessoriesQueryCondition()
                 {
                     ConditionName = item.ConditionName, SysNo = item.SysNo, MasterSysNo = MaterSysNo, ParentSysNo = item.ParentSysNo
                 });
             }
             model.ConditionList        = ConditionList;
             this.DataContext           = model;
             cboCondition.SelectedIndex = 0;
             this.ConditionValueSetResult.Bind();
         });
     };
 }