Beispiel #1
0
        private void gvResult_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            DataRow   dr       = this.gvPallet.GetDataRow(e.RowHandle);
            string    palletNo = Convert.ToString(dr[WIP_CONSIGNMENT_FIELDS.FIELDS_VIRTUAL_PALLET_NO]);
            Hashtable htParams = new Hashtable();
            DataSet   dsParams = new DataSet();

            htParams.Add(WIP_CONSIGNMENT_FIELDS.FIELDS_VIRTUAL_PALLET_NO + "_START", palletNo);
            htParams.Add(WIP_CONSIGNMENT_FIELDS.FIELDS_VIRTUAL_PALLET_NO + "_END", palletNo);
            DataTable dtParams = CommonUtils.ParseToDataTable(htParams);

            dtParams.TableName = TRANS_TABLES.TABLE_MAIN_DATA;
            dsParams.Tables.Add(dtParams);
            DataSet dsLotInfo = this._entity.QueryDetail(dsParams);

            if (!string.IsNullOrEmpty(this._entity.ErrorMsg))
            {
                MessageService.ShowMessage(this._entity.ErrorMsg);
                return;
            }
            //dsLotInfo.Tables[0].Columns.Add("ROW_NUM",typeof(decimal));
            //for (int i = 0; i < dsLotInfo.Tables[0].Rows.Count; i++)
            //{
            //    DataRow drLot = dsLotInfo.Tables[0].Rows[i];
            //    drLot["ROW_NUM"] = i + 1;
            //}
            e.ChildList = dsLotInfo.Tables[0].DefaultView;
            this.gvPalletDetail.OptionsView.ColumnAutoWidth = false;
            this.gvPalletDetail.BestFitColumns();
        }
Beispiel #2
0
        private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView masterGrid = sender as GridView;
            Category category   = (Category)masterGrid.GetRow(e.RowHandle);

            e.ChildList = category.AvailableProducts;
        }
        private void gridAdisyonHareket_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView view = (GridView)sender;
            MutfakAdisyonHareketDto entity = (MutfakAdisyonHareketDto)view.GetRow(e.RowHandle);

            e.ChildList = worker.AdisyonService.MutfakUrunHareketGetir(entity.AdisyonId);
        }
Beispiel #4
0
        private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            e.ChildList = fakeList;
            Parent parent = (sender as GridView).GetRow(e.RowHandle) as Parent;

            UpdateTreeListData(parent);
        }
Beispiel #5
0
        private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView  view = sender as GridView;
            Customers c    = (Customers)view.GetRow(e.RowHandle);

            e.ChildList = c.Orders.ToList();
        }
        private void gvlHistory_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView view = sender as GridView;
            MTSymbol c    = (MTSymbol)view.GetRow(e.RowHandle);
            BindingList <MTHistoryM> bindingHistory = new BindingList <MTHistoryM>(c.MTHistoryMS.ToList());

            bindingSource.DataSource = bindingHistory;

            e.ChildList = bindingSource;

            MTProviderEntities db1         = new MTProviderEntities();
            IList <MTHistoryM> mtHistoryMS = db1.MTHistoryMS.Where(a => a.Symbol == c.Name).ToList();

            foreach (MTHistoryM mtHistory in mtHistoryMS)
            {
                MTHistoryM mtHistoryMSOld = c.MTHistoryMS.Where(a => a.ID == mtHistory.ID).FirstOrDefault();

                if (mtHistory.AllTicks != mtHistoryMSOld.AllTicks)
                {
                    mtHistoryMSOld.AllTicks = mtHistory.AllTicks;
                }
                if (mtHistory.MyTicks != mtHistoryMSOld.MyTicks)
                {
                    mtHistoryMSOld.MyTicks = mtHistory.MyTicks;
                }
            }

            //e.ChildList = bindingHistory;
        }
        private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView view = sender as GridView;
            var      pro  = view.GetRow(e.RowHandle) as Cliente;

            if (pro != null)
            {
                List <long> product = (from a in proveedors
                                       where a.IDCliente == pro.IDCliente
                                       select a.IDProducto).ToList();
                var resp = (from a in productos
                            where product.Contains(a.IDProducto)
                            select a).ToList();

                List <ProveedorProducto> lista = new List <ProveedorProducto>();
                foreach (var a in resp)
                {
                    lista.Add(
                        new ProveedorProducto
                    {
                        Codigo = a.IDProducto,
                        Nombre = a.Nombre,
                        Marca  = (a.Marca != null) ? a.Marca.NombreMarca : "NINGUNO"
                    }
                        );
                }


                e.ChildList = lista;
            }
        }
        private void grvOrder_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            var gridView   = sender as GridView;
            var currentRow = gridView.GetRow(e.RowHandle) as Order;

            e.ChildList = _cartServiceClient.GetListOrderDetail(currentRow.Id);
        }
        private void grvChungTu_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView grv = sender as GridView;

            InforDetailBuy infor = grv.GetRow(e.RowHandle) as InforDetailBuy;

            e.ChildList = listChiTiet.Where(x => x.MaPhieu == infor.MaPhieu).ToList();
        }
Beispiel #10
0
        private void gridViewMaster_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            ShipsMD5 s = (ShipsMD5)gridViewMaster.GetRow(e.RowHandle);
            var      detailBindingSource = new BindingSource(s, "ShipsMD5Detail");

            e.ChildList = detailBindingSource;
            SetBindingSourceToDetailStaticFields(detailBindingSource);
        }
Beispiel #11
0
        private void grvNhanVien_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView grv = sender as GridView;

            EmployeesDTO infor = grv.GetRow(e.RowHandle) as EmployeesDTO;

            e.ChildList = listTheoHangHoaBuy.Where(x => x.MaNV == infor.iMaNV).ToList();
        }
Beispiel #12
0
        private void grvNCC_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView grv = sender as GridView;

            SupplierDTO infor = grv.GetRow(e.RowHandle) as SupplierDTO;

            e.ChildList = listInforBuy.Where(x => x.MaNCC == infor.MaNCC).ToList();
        }
        private void grvKhachHang_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView grv = sender as GridView;

            CustomerDTO infor = grv.GetRow(e.RowHandle) as CustomerDTO;

            e.ChildList = listInforSell.Where(x => x.MaKH == infor.MaKH).ToList();
        }
Beispiel #14
0
        private void gridViewGroupUser_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView grv = sender as GridView;

            GroupUser user = grv.GetRow(e.RowHandle) as GroupUser;

            e.ChildList = listUser.Where(x => x.groupID == user.GR_ID).ToList();
        }
        private void grvCongNo_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView grv = sender as GridView;

            InforDetailSell infor = grv.GetRow(e.RowHandle) as InforDetailSell;


            e.ChildList = listDetailSellGoods.Where(x => x.MaPhieuXuat == infor.MaPhieu).ToList();
        }
        private void grvThongTinChuyenKho_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView grv = sender as GridView;

            InforTransWarehouseDTO infor = grv.GetRow(e.RowHandle) as InforTransWarehouseDTO;


            e.ChildList = listDetailTransWarehouse.Where(x => x.MaPhieuChuyen == infor.MaPhieuChuyen).ToList();
        }
Beispiel #17
0
        private void gvMaster_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            List <RelationName> relations = new List <RelationName>();

            foreach (DataRelation dataRelation in dataSet1.MasterTable.ChildRelations)
            {
                relations.Add(new RelationName(dataRelation.ChildTable.TableName));
            }
            e.ChildList = relations;
        }
Beispiel #18
0
        private void bandedGridView2_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            BandedGridView      bandgv = sender as BandedGridView;
            CHITIETPHIEUMUONDTO ct     = bandgv.GetRow(e.RowHandle) as CHITIETPHIEUMUONDTO;

            if (ct != null)
            {
                e.ChildList = listpm.Where(p => (p.NgayMuon == ct.NgayMuon && p.MaDocGia == ct.MaDocGia) && (p.TinhTrangMuon == "Còn hạn" || p.TinhTrangMuon == "Quá hạn")).Select(p => p).ToList();
            }
        }
Beispiel #19
0
        private void grvroottct_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView            view = sender as GridView;
            TheoChungTu_PNH_DTO cat  = view.GetRow(e.RowHandle) as TheoChungTu_PNH_DTO;

            if (cat != null)
            {
                e.ChildList = lst_pnhct.Where(x => x.MaPhieuNhapHang == cat.ChungTu).ToList();
            }
        }
Beispiel #20
0
        private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView     view  = sender as GridView;
            PhieuBanHang Phieu = view.GetRow(e.RowHandle) as PhieuBanHang;

            if (Phieu != null)
            {
                e.ChildList = CT_phieu.Where(x => x.MaPBH == Phieu.MaBH).ToList();
            }
        }
Beispiel #21
0
 private void gridView_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
 {
     if (e.RowHandle >= 0)
     {
         Probe probe = gridView.GetRow(e.RowHandle) as Probe;
         if (probe.IsNotNull())
         {
             e.ChildList = probe.Screenings;
         }
     }
 }
Beispiel #22
0
        private void mainEquityView_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            if (e.RowHandle != DevExpress.XtraGrid.GridControl.InvalidRowHandle)
            {
                var masterView   = sender as GridView;
                var masterRecord = masterView?.GetRow(e.RowHandle) as B3Provider.Records.B3EquityInfo;
                var options      = providerClient.OptionInstruments.Where(o => o.B3IDUnderlying == masterRecord?.B3ID).ToList();

                e.ChildList = options;
            }
        }
        private void gridView1_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView view   = sender as GridView;
            var      value  = view.GetRowCellValue(e.RowHandle, colMaHD);
            var      value2 = a.xemThongCTHD((int)value);

            if (value2 != null)
            {
                e.ChildList = value2;
            }
        }
        private void grvCabecera_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            //Carga datos al detalle
            GridView           view     = sender as GridView;
            CEExportacionSaldo cabecera = view.GetRow(e.RowHandle) as CEExportacionSaldo;

            if (cabecera != null)
            {
                e.ChildList = lstDetalleExportaciones.Where(x => x.Exportacion_Id == cabecera.Exp_Id).ToList();
            }
        }
 private void bandedGridViewTaiSan_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
 {
     try
     {
         //TaiSanHienThi c = (TaiSanHienThi)bandedGridViewTaiSan.GetRow(e.RowHandle);
         //e.ChildList = TaiSanHienThi.Convert(c.childs);
         TaiSanHienThi c = (TaiSanHienThi)gridViewTaiSan.GetRow(e.RowHandle);
         e.ChildList = TaiSanHienThi.Convert(c.childs);
     }
     catch (Exception ex)
     {
         Debug.WriteLine(this.Name + "->bandedGridViewTaiSan_MasterRowGetChildList: " + ex.Message);
     }
 }
Beispiel #26
0
        private void gvResults_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            DataRow dr      = this.gvResults.GetDataRow(e.RowHandle);
            string  labelId = Convert.ToString(dr["LABEL_ID"]);

            PrintLabelEntity entity            = new PrintLabelEntity();
            DataSet          dsLabelDetailData = entity.GetPrintLabelDetailData(labelId);

            if (!string.IsNullOrEmpty(entity.ErrorMsg))
            {
                MessageService.ShowError(entity.ErrorMsg);
                return;
            }
            e.ChildList = dsLabelDetailData.Tables[0].DefaultView;
        }
        private void gridAdisyonHareket_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            GridView          view   = (GridView)sender;
            AdisyonHareketDto entity = (AdisyonHareketDto)view.GetRow(e.RowHandle);

            switch (e.RelationIndex)
            {
            case 0:
                e.ChildList = worker.UrunHareketService.GetList(c => c.AdisyonId == entity.AdisyonId, c => c.Urun, c => c.Porsiyon, c => c.Porsiyon.Birim).ToList();
                break;

            case 1:
                e.ChildList = worker.OdemeHareketService.GetList(c => c.AdisyonId == entity.AdisyonId, c => c.OdemeTuru, c => c.OdemeTuru.OdemeTur).ToList();
                break;
            }
        }
Beispiel #28
0
        private void gvTieuChiDanhGia_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            var      dao  = new NoiDungChiTietDAO();
            GridView view = sender as GridView;
            var      tcdg = view.GetRow(e.RowHandle) as dynamic;

            if (tcdg != null)
            {
                e.ChildList = (dao.GetAllTieuChi(tcdg.MaTC) as List <NoiDungChiTiet>).ToList().Select(x => new
                {
                    MaCTView = (x.MaCT >= 10) ? "0" + x.MaCT : "00" + x.MaCT,
                    x.MaCT,
                    x.MaTC,
                    x.NoiDung,
                    x.DiemCTMax
                }).ToList();
            }
        }
Beispiel #29
0
        private void gvList_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            DataRow             dr     = this.gvList.GetDataRow(e.RowHandle);
            string              partid = Convert.ToString(dr["PART_ID"]);
            ByProductPartEntity byProductPartEntity = new ByProductPartEntity();
            DataSet             dsReturn            = byProductPartEntity.GetByPartId(partid);

            if (!string.IsNullOrEmpty(byProductPartEntity.ErrorMsg))
            {
                MessageService.ShowMessage(byProductPartEntity.ErrorMsg);
                return;
            }
            DataTable dtChild = new DataTable();

            //判定获取数据是否为空
            if (dsReturn != null || dsReturn.Tables.Count > 0)
            {
                dtChild = dsReturn.Tables[0];
                //遍历查询结果
                for (int i = 0; i < dtChild.Rows.Count; i++)
                {
                    string   gradesOut     = string.Empty;
                    string   gradesOutUsed = string.Empty;
                    string   grades        = dtChild.Rows[i]["GRADES"].ToString().Trim(); ///获取等级列信息
                    string[] arrTemp       = grades.Split(',');                           ///数组取值(等级组所有等级)
                    for (int j = 0; j < arrTemp.Length; j++)
                    {
                        gradesOut += GetProductGradeDisplayText(arrTemp[j]) + ",";               ///调用等级转换将转换数据重新组合,并用逗号隔开
                    }
                    gradesOutUsed             = gradesOut.Remove(gradesOut.LastIndexOf(","), 1); ///去掉最后的,号
                    dtChild.Rows[i]["GRADES"] = gradesOutUsed;                                   ///列重新赋值
                }
                e.ChildList = dtChild.DefaultView;
            }
            else
            {
                e.ChildList = dsReturn.Tables[0].DefaultView;
            }
        }
Beispiel #30
0
        private void gridViewMain_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            // load data đen grid detail
            GridView     view         = sender as GridView;
            LoaiQuyen    loaiQuyen    = view.GetRow(e.RowHandle) as LoaiQuyen;
            List <Quyen> quyensTheoMa = new List <Quyen>();

            if (loaiQuyen != null)
            {
                if (comboBoxChucVu.SelectedItem != null)
                {
                    List <string> maQuyenTheoChucVu =
                        (comboBoxChucVu.SelectedItem as ComboBoxItemPhanQuyen).ChucVu.MaQuyens;

                    foreach (Quyen quyen in quyens)
                    {
                        if (quyen.LoaiQuyenId == loaiQuyen.LoaiQuyenId)
                        {
                            quyensTheoMa.Add(quyen);
                        }
                    }

                    quyensTheoMa.ForEach((quyen) =>
                    {
                        if (maQuyenTheoChucVu.Contains(quyen.QuyenId))
                        {
                            quyen.Check = true;
                        }
                        else
                        {
                            quyen.Check = false;
                        }
                    });
                }
                e.ChildList = quyensTheoMa;
            }
        }