Ejemplo n.º 1
0
        public void ucEng_Create()
        {
            try
            {
                ucG = new ucGatheringCtl[iucEngCnt];

                double dRow = 0;

                int icnt = 0;

                int iQty = 3; //열 표시 수량

                int iWidth  = 333;
                int iHeight = 222;

                dRow = iucEngCnt;

                dRow = Math.Ceiling(dRow / iQty);

                for (int i = 0; i < iucEngCnt; i++)
                {
                    ucG[i] = new ucGatheringCtl(dsSetting.Tables["P_SET"].Rows[i]);
                }

                for (int a = 0; a < dRow; a++)
                {
                    for (int b = 0; b < iQty; b++)
                    {
                        if (icnt == iucEngCnt)
                        {
                            break;
                        }

                        CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Width  = iWidth);
                        CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Height = iHeight);
                        CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Top    = (a * (iHeight + 10)) + 10);
                        CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Left   = b * (iWidth + 10));
                        CoFAS_ControlManager.InvokeIfNeeded(_pnGMain, () => _pnGMain.Controls.Add(ucG[icnt]));
                        icnt++;
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 2
0
        private void LocalFind_DisplayData()
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);


                if (_pCoFASXml.GetSingleNodeValue("SERVERSOCKET/IP").Length > 0)    //값이 있으면, 설정
                {
                    try
                    {
                        ucG = new ucGatheringCtl[1];

                        int icnt = 0;

                        int iQty = 3;    //열 표시 수량

                        double dRow = 1; // 카드 수량

                        dRow = Math.Ceiling(dRow / iQty);

                        int iWidth  = 333;
                        int iHeight = 222;

                        for (int i = 0; i < _dtList.Rows.Count; i++)
                        {
                            _dtSubList = new GatheringMainBusiness().Gathering_Search_Sub(_dtList.Rows[i]);  // 게더링 프로그램 Row 세팅


                            ucG[i] = new ucGatheringCtl(_dtList.Rows[i], _dtSubList, _DtMinMax);
                        }

                        for (int a = 0; a < dRow; a++)
                        {
                            for (int b = 0; b < iQty; b++)
                            {
                                if (icnt == _dtList.Rows.Count)
                                {
                                    break;
                                }
                                CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Width  = iWidth);
                                CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Height = iHeight);
                                CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Top    = (a * (iHeight + 10)) + 10);
                                CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Left   = b * (iWidth + 10));
                                CoFAS_ControlManager.InvokeIfNeeded(_pnGMain, () => _pnGMain.Controls.Add(ucG[icnt]));
                                icnt++;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                }
                else
                {
                    DisplayMessage("조회 내역이 없습니다.");
                }
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString()));
            }
            finally
            {
                //_gdMAIN_VIEW.BestFitColumns();

                CoFAS_DevExpressManager.SetCursor(this, Cursors.Default);
            }
        }
Ejemplo n.º 3
0
        private void MainFind_DisplayData()
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);

                _dtList = new GatheringMainBusiness().Gathering_Search_Mst(_pGatheringMainEntity);  // 게더링 프로그램 Header 세팅


                //for(int a = 0; a < _dtList.Rows.Count; a++)
                //{
                //    if( int.Parse(_dtList.Rows[a]["GROUPCNT"].ToString()) >1)
                //    {

                //    }
                //}



                // 받은 데이터 변환 시켜야함. 추가..

                if (_dtList != null && _dtList.Rows.Count > 0)    //값이 있으면, 설정
                {
                    try
                    {
                        ucG = new ucGatheringCtl[_dtList.Rows.Count];

                        int icnt = 0;

                        int iQty = 3;                     //열 표시 수량

                        double dRow = _dtList.Rows.Count; // 카드 수량

                        dRow = Math.Ceiling(dRow / iQty);

                        int iWidth  = 333;
                        int iHeight = 222;

                        for (int i = 0; i < _dtList.Rows.Count; i++)
                        {
                            _dtSubList = new GatheringMainBusiness().Gathering_Search_Sub(_dtList.Rows[i]);  // 게더링 프로그램 Row 세팅


                            ucG[i] = new ucGatheringCtl(_dtList.Rows[i], _dtSubList, _DtMinMax);
                        }

                        for (int a = 0; a < dRow; a++)
                        {
                            for (int b = 0; b < iQty; b++)
                            {
                                if (icnt == _dtList.Rows.Count)
                                {
                                    break;
                                }
                                CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Width  = iWidth);
                                CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Height = iHeight);
                                CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Top    = (a * (iHeight + 10)) + 10);
                                CoFAS_ControlManager.InvokeIfNeeded(ucG[icnt], () => ucG[icnt].Left   = b * (iWidth + 10));
                                CoFAS_ControlManager.InvokeIfNeeded(_pnGMain, () => _pnGMain.Controls.Add(ucG[icnt]));
                                icnt++;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                }
                else
                {
                    DisplayMessage("조회 내역이 없습니다.");
                }
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString()));
            }
            finally
            {
                //_gdMAIN_VIEW.BestFitColumns();

                CoFAS_DevExpressManager.SetCursor(this, Cursors.Default);
            }
        }