public override object PerformSelectOneObject()
        {
            SelectedRow = dsCollection.Tables[0].NewRow();
            SelectedRow["Id_Nhom_Hanghoa"] = treeListColumn1.TreeList.FocusedNode.GetValue("Id_Nhom_Hanghoa");
            SelectedRow["Id_Loai_Hanghoa"] = treeListColumn1.TreeList.FocusedNode.GetValue("Id_Loai_Hanghoa");
            SelectedRow["Id_Hanghoa"]      = treeListColumn1.TreeList.FocusedNode.GetValue("Id_Hanghoa");
            SelectedRow["Ma_Hanghoa"]      = treeListColumn1.TreeList.FocusedNode.GetValue("Ma_Hanghoa");
            SelectedRow["Ten_Hanghoa"]     = treeListColumn1.TreeList.FocusedNode.GetValue("Ten_Hanghoa");
            SelectedRow["Ma_Ql"]           = treeListColumn1.TreeList.FocusedNode.GetValue("Ma_Ql");
            SelectedRow["Ma_Ql_Pk"]        = treeListColumn1.TreeList.FocusedNode.GetValue("Ma_Ql_Pk");

            _Ware_Dm_Hanghoa_Ban = new WebReferences.MasterService.Ware_Dm_Hanghoa_Ban()
            {
                Barcode_Txt     = treeListColumn1.TreeList.FocusedNode.GetValue("Barcode_Txt"),
                Dongia_Mua      = treeListColumn1.TreeList.FocusedNode.GetValue("Dongia_Mua"),
                Hamluong        = treeListColumn1.TreeList.FocusedNode.GetValue("Hamluong"),
                Id_Donvitinh    = treeListColumn1.TreeList.FocusedNode.GetValue("Id_Donvitinh"),
                Id_Hanghoa_Ban  = treeListColumn1.TreeList.FocusedNode.GetValue("Id_Hanghoa_Ban"),
                Ma_Hanghoa_Ban  = treeListColumn1.TreeList.FocusedNode.GetValue("Ma_Hanghoa_Ban"),
                Quycach         = treeListColumn1.TreeList.FocusedNode.GetValue("Quycach"),
                Ten_Hanghoa_Ban = treeListColumn1.TreeList.FocusedNode.GetValue("Ten_Hanghoa_Ban"),
            };

            this.Close();
            return(base.PerformSelectOneObject());
        }
示例#2
0
        private void cvware_Dm_Hanghoa_Ban_MouseDown(object sender, MouseEventArgs e)
        {
            if (!_IsDialog)
            {
                return;
            }

            DevExpress.XtraGrid.Views.Card.ViewInfo.CardHitInfo cardHit = cvware_Dm_Hanghoa_Ban.CalcHitInfo(e.X, e.Y);
            if (cardHit.InCard)
            {
                cvware_Dm_Hanghoa_Ban.FocusedRowHandle = cardHit.RowHandle;
                //Current_Id_Loai_Hanghoa_Ban = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Id_Hanghoa_Ban");
                _Selected_Ware_Dm_Hanghoa_Ban = new WebReferences.MasterService.Ware_Dm_Hanghoa_Ban()
                {
                    Id_Hanghoa_Ban      = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Id_Hanghoa_Ban"),
                    Id_Loai_Hanghoa_Ban = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Id_Loai_Hanghoa_Ban"),
                    Ma_Hanghoa_Ban      = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Ma_Hanghoa_Ban"),
                    Ten_Hanghoa_Ban     = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Ten_Hanghoa_Ban"),
                    Barcode_Txt         = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Barcode_Txt"),
                    Size     = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Size"),
                    Quycach  = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Quycach"),
                    Hamluong = cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Hamluong"),
                };

                GoobizFrame.Windows.MdiUtils.ThemeSettings.MakeConditionForSelectedCard(cvware_Dm_Hanghoa_Ban, "Id_Hanghoa_Ban",
                                                                                        cvware_Dm_Hanghoa_Ban.GetRowCellValue(cardHit.RowHandle, "Id_Hanghoa_Ban"));

                //this.Dispose();
                this.Close();
            }
        }