private void GenerateDataHistory(object obj)
        {
            dt = SuratBusiness.SelectHistoryPenyelesaian(this.filter);//...SelectHistoryLoginUser(this.filter);

            Thread.Sleep(50);

            for (int i = dt.Rows.Count - 1; i >= 0; i--)
            {
                if (this.gvPenyelesaian.InvokeRequired)
                {
                    this.gvPenyelesaian.Invoke(new addRowDelegate(this.addRow), GetDataRow(dt, i));
                }
                else
                {
                    this.gvPenyelesaian.Rows.Insert(0, GetDataRow(dt, i));
                }

                Thread.Sleep(50);
            }

            Thread.Sleep(50);

            if (frmLoading.InvokeRequired)
            {
                this.frmLoading.Invoke(new frmLoadingDelegate(this.closeFrmLoading), true);
            }
            else
            {
                closeFrmLoading(true);
            }
        }
Example #2
0
        private void GenerateDataHistory(object obj)
        {
            dtDisposisi = SuratBusiness.SelectHistoryDisposisi(this.filter);

            Thread.Sleep(50);

            for (int i = dtDisposisi.Rows.Count - 1; i >= 0; i--)
            {
                if (this.gvSejarahDisposisi.InvokeRequired)
                {
                    this.gvSejarahDisposisi.Invoke(new addRowDelegate(this.addRowDisposisi), GetDataRow(dtDisposisi, i));
                }
                else
                {
                    this.gvSejarahDisposisi.Rows.Insert(0, GetDataRow(dtDisposisi, i));
                }

                Thread.Sleep(50);
            }

            dtPenyelesaian = SuratBusiness.SelectHistoryPenyelesaian(this.filter);

            Thread.Sleep(50);

            for (int i = dtPenyelesaian.Rows.Count - 1; i >= 0; i--)
            {
                if (this.gvPenyelesaian.InvokeRequired)
                {
                    this.gvPenyelesaian.Invoke(new addRowDelegate(this.addRowPenyelesaian), GetDataRowPenyelesaian(dtPenyelesaian, i));
                }
                else
                {
                    this.gvPenyelesaian.Rows.Insert(0, GetDataRow(dtPenyelesaian, i));
                }

                Thread.Sleep(50);
            }

            Thread.Sleep(50);

            if (frmLoading.InvokeRequired)
            {
                this.frmLoading.Invoke(new frmLoadingDelegate(this.closeFrmLoading), true);
            }
            else
            {
                closeFrmLoading(true);
            }
        }