Exemplo n.º 1
0
        private void BJbackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            BJarg arg = e.Result as BJarg;

            //BJlayoutControlGroup.Text = arg.NOR.ToString();
            BJupdTStextEdit.Text = arg.ExecutionTS.ToString();
            BJselAktifGridView.EndDataUpdate();
            //BJselAktifGridControl.DataSource = BJselAktifBindingSource;
        }
Exemplo n.º 2
0
        private void BJbackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BJarg arg = e.Argument as BJarg;

            arg.NOR = this.BJselAktifTableAdapter.Fill(this.dataSet.BJ_SEL_AKTIF);
            //DoJobs();

            string HataMsj = string.Empty;

            //Thread.Sleep(5000);
            for (int i = 0; i < this.dataSet.BJ_SEL_AKTIF.Rows.Count; i++)
            {
                if (this.dataSet.BJ_SEL_AKTIF.Rows[i]["USR"].ToString() == "dron")
                {
                    this.dataSet.BJ_SEL_AKTIF.Rows[i]["ENDTS"] = DateTime.Now;
                    // Hata mesajlarini reportProgres ile gonder ki LOG edilebilsin
                    arg.Msj = SendMail(i);
                    BJbackgroundWorker.ReportProgress(i, arg);
                }
            }


            /*
             * Form f = new Form();
             * GridControl grid = new GridControl();
             * grid.Parent = f;
             * grid.Visible = true;
             * GridView view = new GridView(grid);
             * grid.DataSource = this.dataSet.BJ_SEL_AKTIF;
             * grid.Location = new System.Drawing.Point(0, 0);
             * grid.MainView = view as BaseView;
             * grid.Name = "GridControl2";
             * grid.Size = new System.Drawing.Size(518, 273);
             * grid.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { (BaseView)view });
             * view.GridControl = grid;
             * view.Name = "TempGridView1";
             * //view.RestoreLayoutFromStream(dataStream, DevExpress.Utils.OptionsLayoutBase.FullLayout);
             * //dataStream.Close();
             * grid.ExportToPdf(@"C:\" + DateTime.Now.Minute.ToString() + ".PDF");
             * */

            arg.ExecutionTS = DateTime.Now;

            e.Result = arg;
        }