private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
        {
            if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
            {
                var item = (DeliverySearchEntity)e.Row.Item;
                var gv   = (RadGridView)e.DetailsElement;
                if (gv.Tag == null)
                {
                    gv.Tag = new object();
                    SysProcessView.UIHelper.TransferSizeToHorizontal(gv);

                    GridViewExpressionColumn expColumn = gv.Columns["colDiscountPrice"] as GridViewExpressionColumn;
                    expColumn.Expression = _expression;
                }
                //var sizeCol = gv.Columns.FirstOrDefault<Telerik.Windows.Controls.GridViewColumn>(o => o.Header.ToString() == "尺码");
                //if (sizeCol != null)
                //{
                //    int index = gv.Columns.IndexOf(sizeCol);
                //    gv.Columns.RemoveAt(index);
                //    foreach (var size in VMGlobal.Sizes)
                //    {
                //        var col = new GridViewDataColumn() { Header = size.Name, UniqueName = size.Name, DataMemberBinding = new Binding(size.Name) };
                //        gv.Columns.Insert(index, col);
                //        index++;
                //    }
                //}
                gv.ItemsSource = new BillReportHelper().TransferSizeToHorizontal <DistributionProductShow>(item.Details, propertyNamesForSum: new string[] { "Quantity", "SettlementPrice" });
                //gv.ItemsSource = item.Details;
            }
        }
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var gv   = (RadGridView)e.DetailsElement;
         var item = (StocktakeSearchEntity)e.Row.Item;
         gv.ItemsSource = ReportDataContext.GetBillStocktakeDetails(item.BillID);
     }
 }
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var gv   = (RadGridView)e.DetailsElement;
         var item = (BillProductExchangeSearchEntity)e.Row.Item;
         gv.ItemsSource = item.Details;
     }
 }
Example #4
0
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var item = (AvailableStockStatisticsEntity)e.Row.Item;
         var gv   = (RadGridView)e.DetailsElement;
         gv.ItemsSource = item.Details;
     }
 }
Example #5
0
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var item = (BillGoodReturnForSearch)e.Row.Item;
         var gv   = (RadGridView)e.DetailsElement;
         gv.ItemsSource = ReportDataContext.SearchBillDetails <BillGoodReturnDetails>(item.ID);
     }
 }
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var item  = (FundAccountTotalEntity)e.Row.Item;
         var grid  = (Grid)e.DetailsElement;
         var pager = grid.FindChildByType <RadDataPager>();
         this.SearchDetails(pager, item, grid);
     }
 }
        //private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
        //{
        //    if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
        //    {
        //        var gv = (RadGridView)e.DetailsElement;
        //        var item = e.Row.Item;
        //        var proBill = item.GetType().GetProperty("BillID");
        //        var billID = (int)proBill.GetValue(item, null);
        //        var details = ReportDataContext.GetBillOrderDetails(billID);
        //        //if (_fpHelper == null)
        //        //    _fpHelper = new FloatPriceHelper();
        //        //foreach (var d in details)
        //        //{
        //        //    d.Price = _fpHelper.GetFloatPrice(VMGlobal.CurrentUser.OrganizationID, d.ProductID);
        //        //}
        //        gv.ItemsSource = details;
        //    }
        //}

        private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
        {
            if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
            {
                var item = (OrderSearchEntity)e.Row.Item;
                var gv = (RadGridView)e.DetailsElement;
                if (gv.Tag == null)
                {
                    gv.Tag = new object();
                    SysProcessView.UIHelper.TransferSizeToHorizontal(gv);
                }
                gv.ItemsSource = new BillReportHelper().TransferSizeToHorizontal<ProductForOrderReport>(item.Details);
            }
        }
Example #8
0
        private void raddgrDanhSach_LoadingRowDetails(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
        {
            DataRowView dtrv = e.Row.Item as DataRowView;
            DataTable   dt   = dtDetail.Clone();

            foreach (DataRow dr in dtDetail.Select("SO_HDTDVM ='" + dtrv["SO_HDTDVM"].ToString() + "'"))
            {
                dt.Rows.Add(dr.ItemArray);
            }
            RadGridView radGridViewDetail = e.DetailsElement.FindName("radDetailHDTD") as RadGridView;

            radGridViewDetail.ItemsSource = dt.DefaultView;
            radGridViewDetail.Rebind();
        }
Example #9
0
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var item = (DeliverySearchEntity)e.Row.Item;
         var grid = (Grid)e.DetailsElement;
         if (!_dicDataContext.ContainsKey(item.ID))
         {
             _dicDataContext.Add(item.ID, new BillStoringWhenReceivingVM(item));
         }
         grid.DataContext = _dicDataContext[item.ID];
         grid.Tag         = item;
     }
 }
Example #10
0
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var gv      = (RadGridView)e.DetailsElement;
         var item    = (ContrastSearchEntity)e.Row.Item;
         var details = ReportDataContext.GetBillStocktakeContrastDetails(item.ID);
         //if (_fpHelper == null)
         //    _fpHelper = new FloatPriceHelper();
         //foreach (var d in details)
         //{
         //    d.Price = _fpHelper.GetFloatPrice(VMGlobal.CurrentUser.OrganizationID, d.ProductID);
         //}
         gv.ItemsSource = details;
     }
 }
Example #11
0
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var gv   = (RadGridView)e.DetailsElement;
         var item = (BillSubcontractSearchEntity)e.Row.Item;
         gv.ItemsSource = item.Details;
         foreach (var d in item.Details)
         {
             if (d.DeliveryDate < DateTime.Now.Date && d.Status != "已完成")//过期未完成
             {
                 var row = gv.ItemContainerGenerator.ContainerFromItem(d) as GridViewRow;
                 UIHelper.SetGridRowValidBackground(row, false);
             }
         }
     }
 }
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var item = (BillGoodReturnForSearch)e.Row.Item;
         var gv   = (RadGridView)e.DetailsElement;
         if (gv.Tag == null)
         {
             gv.Tag = new object();
             SysProcessView.UIHelper.TransferSizeToHorizontal(gv);
             GridViewExpressionColumn expColumn = gv.Columns["colDiscountPrice"] as GridViewExpressionColumn;
             expColumn.Expression = _expressionPD;
             expColumn            = gv.Columns["colDiscountPriceQuantity"] as GridViewExpressionColumn;
             expColumn.Expression = _expressionPDQ;
         }
         gv.ItemsSource = new BillReportHelper().TransferSizeToHorizontal <DistributionProductShow>(item.Details);
     }
 }
Example #13
0
 private void RadGridView1_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
 {
     if (e.DetailsElement != null && e.Visibility == Visibility.Visible)
     {
         var item = (CannibalizeSearchEntity)e.Row.Item;
         var grid = (Grid)e.DetailsElement;
         if (!_dicDataContext.ContainsKey(item.ID))
         {
             _dicDataContext.Add(item.ID, new BillStoringCannibalizeVM(item));
         }
         grid.DataContext = _dicDataContext[item.ID];
         grid.Tag         = item;
         //var gv = View.Extension.UIHelper.GetVisualChild<RadGridView>(grid);
         //gv.ItemsSource = BillStoringCannibalizeVM.GetBillCannibalizeDetails(item.ID);
         //var cbxStorage = View.Extension.UIHelper.GetVisualChild<DataFormComboBoxField>(grid);
         //cbxStorage.ItemsSource = StorageInfoVM.Storages;
     }
 }