예제 #1
0
        private void btnCreateReport_Click(object sender, EventArgs e)
        {
            string     dateReport = dateMenu.Value.ToString("yyyy-MM-dd");
            ReportForm frmReport  = new ReportForm(dateReport);

            frmReport.Show();
        }
        private void buatLaporanByQuery(object laporan, DateTime startTime, DateTime endTime)
        {
            ReportForm reportForm = new ReportForm(main);

            reportForm.MdiParent   = main;
            reportForm.WindowState = FormWindowState.Maximized;

            reportForm.GetCrystalReportViewer().ReportSource = laporan;

            ParameterField         field1 = new ParameterField();
            ParameterDiscreteValue value1 = new ParameterDiscreteValue();

            field1.Name  = "startTime";
            value1.Value = startTime;
            field1.CurrentValues.Add(value1);

            ParameterField         field2 = new ParameterField();
            ParameterDiscreteValue value2 = new ParameterDiscreteValue();

            field2.Name  = "endTime";
            value2.Value = endTime;
            field2.CurrentValues.Add(value2);

            ParameterFields fields = new ParameterFields();

            fields.Add(field1);
            fields.Add(field2);

            reportForm.GetCrystalReportViewer().ParameterFieldInfo = fields;
            reportForm.GetCrystalReportViewer().Refresh();
            reportForm.Show();
        }
예제 #3
0
        internal void postFile(string username, string getGame, string matchid, string filepath)
        {
            try
            {
                WebProxy proxy = WebProxy.GetDefaultProxy();
                proxy.UseDefaultCredentials = true;
                var myClient = new WebClientEx();
                ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); };
                myClient.Headers.Add("Content-Type", "binary/octet-stream");
                myClient.Proxy    = proxy;
                myClient.Timeout  = 86400000;
                myClient.filepath = filepath;
                byte[] result = myClient.UploadFile(GlobalSettings.Website_URL + "/upload.php?user="******"&game=" + getGame + "&matchid=" + matchid, "POST", filepath);

                string response = System.Text.Encoding.UTF8.GetString(result, 0, result.Length);

                if (response.Contains("Invalid") || response.Contains("Failed!"))
                {
                    ReportForm ef = new ReportForm();
                    ef.label2.Text = response;
                    ef.Show();
                }
            }
            catch (Exception)
            {
                ReportForm ef = new ReportForm();
                ef.label2.Text = "Upload failed";
                ef.Show();
            }
        }
예제 #4
0
        private async void Alarm_btn_Click(object sender, EventArgs e)
        {
            string addr = await service.GetAddress();

            this.Hide();
            reportForm.Show();
        }
예제 #5
0
        private void buatLaporanByQueryStock(object laporan, Boolean blank)
        {
            ReportForm reportForm = new ReportForm(main);

            reportForm.MdiParent   = main;
            reportForm.WindowState = FormWindowState.Maximized;

            reportForm.GetCrystalReportViewer().ReportSource = laporan;

            ParameterField         field1 = new ParameterField();
            ParameterDiscreteValue value1 = new ParameterDiscreteValue();

            field1.Name  = "blank";
            value1.Value = blank;
            field1.CurrentValues.Add(value1);

            ParameterFields fields = new ParameterFields();

            fields.Add(field1);

            reportForm.GetCrystalReportViewer().ReportSource       = laporan;
            reportForm.GetCrystalReportViewer().ParameterFieldInfo = fields;
            reportForm.GetCrystalReportViewer().Refresh();
            reportForm.Show();
        }
예제 #6
0
        private void raporToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportForm frm = new ReportForm();

            frm.MdiParent = this;
            frm.Show();
        }
예제 #7
0
        private void obrotFKDrukujButton_Click(object sender, EventArgs e)
        {
            string     przedstawiciel = (string)this.przedstawicieleComboBox.SelectedItem;
            ReportForm raport         = new ReportForm("Reports\\DokumentyListaReport.rdlc", "DokumentyViewRow", dokObrotyFK, null);

            raport.Show();
        }
예제 #8
0
        private void drukujButton_Click(object sender, EventArgs e)
        {
            decimal    podatekDochodowy = decimal.Round((decimal)this.dowyplaty * 0.19M, 2);
            ReportForm raport           = new ReportForm("Reports\\ProwizjaPodsumowanieReport.rdlc", "RaportProwizjiData",
                                                         new List <RaportProwizjiData>()
            {
                new RaportProwizjiData()
                {
                    Przedstawiciel       = (string)this.przedstawicieleComboBox.SelectedItem,
                    ZaOkres              = (this.miesiąceComboBox.SelectedIndex + 1).ToString().PadLeft(2, '0') + "/" + this.rokTextBox.Text,
                    ProwizjaOdFV         = string.Format("{0:C}", this.prowizjaFV),
                    ProwizjaOdFVOpis     = "(Zapłacone FV: " + string.Format("{0:C}", sumaSprzedazyNetto) + " -> " + (sumaSprzedazyNetto == 0 ? 0 : decimal.Round((decimal)prowizjaFV / (decimal)sumaSprzedazyNetto * 100, 2)) + "%)",
                    ProwizjaOdFK         = string.Format("{0:C}", this.prowizjaFK),
                    ProwizjaOdFKOpis     = "(Zapłacone FK: " + string.Format("{0:C}", sumaKorektNetto) + " -> " + (sumaKorektNetto == 0 ? 0 : decimal.Round((decimal)prowizjaFK / (decimal)sumaKorektNetto * 100, 2)) + "%)",
                    ProwizjaSuma         = string.Format("{0:C}", this.prowizjaSuma),
                    ProwizjaSumaOpis     = "(Suma FV i FK: " + string.Format("{0:C}", sumaSprzedazyNetto + sumaKorektNetto) + " -> " + (sumaSprzedazyNetto == 0 && sumaKorektNetto == 0 ? 0 : decimal.Round((decimal)prowizjaSuma / (decimal)(sumaSprzedazyNetto + sumaKorektNetto) * 100, 2)) + "%)",
                    Przeterminowania     = string.Format("{0:C}", this.przeterminowane),
                    PrzeterminowaniaOpis = "(Od kwoty: " + sumaDoRozliczeniaPotraceniaTextBox.Text + ")",
                    Wysylki              = string.Format("{0:C}", this.wysylki),
                    WysylkiOpis          = "(" + ilość_paczek.ToString() + " p. * " + string.Format("{0:C}", GetCenaPaczki()) + " - " + (ilość_paczek > 50?"50":ilość_paczek.ToString()) + ",00%)",
                    Magazynowe           = string.Format("{0:C}", this.magazynowe),
                    MagazynoweOpis       = "(1,00% od " + string.Format("{0:C}", decimal.Round((decimal)(obrotFirmaFV + obrotFirmaFK), 2)) + ")",
                    ProwizjaNetto        = string.Format("{0:C}", this.dowyplaty),
                    PodatekDochodowy     = string.Format("{0:C}", podatekDochodowy),
                    DoWyplaty            = string.Format("{0:C}", this.dowyplaty - podatekDochodowy),
                    PodatekVat           = string.Format("{0:C}", decimal.Round((decimal)this.dowyplaty * 0.23M, 2))
                }
            }, null);

            raport.Show();
        }
예제 #9
0
        private void butGPA_Click(object sender, EventArgs e)
        {
            DataSet1.ReportsDataTable dt = new DataSet1.ReportsDataTable();
            dt = (DataSet1.ReportsDataTable)SetOrderDetails(listReports);
            ReportForm rf = new ReportForm(dt);

            rf.Show();
        }
예제 #10
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            DataSet1.CustomerDataTable dt = new DataSet1.CustomerDataTable();
            dt = (DataSet1.CustomerDataTable)SetCustomerDetails(customer);
            ReportForm rf = new ReportForm(dt);

            rf.Show();
        }
예제 #11
0
        public static void RunReportForm(MainForm form, int userId)
        {
            form.Hide();
            ReportForm reportForm = new ReportForm(userId);

            reportForm.Closed += (s, args) => form.Close();
            reportForm.Show();
        }
예제 #12
0
        private void reportToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportForm Report = new ReportForm();

            Report.FormBorderStyle = FormBorderStyle.FixedSingle;
            Report.MaximizeBox     = false;
            Report.Show();
        }
예제 #13
0
 /// <summary>
 /// InitiliazeGUI
 /// </summary>
 /// <param name="parent"></param>
 public void InitiliazeGUI(Form parent)
 {
     // initialize GUI part
     this.parentForm     = parent;
     frmReport           = new ReportForm(this);
     frmReport.MdiParent = parent;
     frmReport.Show();
 }
예제 #14
0
        private void generateOccupancyReToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReportForm rf = new ReportForm(bookingController);

            rf.MdiParent     = this;    // Setting the MDI Parent
            rf.StartPosition = FormStartPosition.CenterParent;
            rf.Show();
        }
        /// <summary>
        /// 图形报表处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAnalysis_Click(object sender, EventArgs e)
        {
            ReportForm report = new ReportForm();

            report.SQL             = MakeSql(new MyDataGridView());
            report.XAxisColumnName = "区域名称";
            report.Title           = "走势图";
            report.GraphType       = ReportForm.ReportGraphType.Line;
            report.Show();
        }
예제 #16
0
        private void obrotFVDrukujButton_Click(object sender, EventArgs e)
        {
            string   przedstawiciel = (string)this.przedstawicieleComboBox.SelectedItem;
            DateTime dataOd         = this.getDataOd();
            DateTime dataDo         = this.getDataDo();

            ReportForm raport = new ReportForm("Reports\\DokumentyObrotyReport.rdlc", "DokumentyProwizjeViewRow", dokObrotyFV, null);

            raport.Show();
        }
예제 #17
0
        public MainForm()
        {
            InitializeComponent();

            FormClosed += new FormClosedEventHandler(MainForm_FormClosed);

            this.KeyPreview = true;

            try
            {
                username = File.ReadAllText(Core.AppPath + "myusername.txt");

                label2.Text = username;

                connectedAsusernameToolStripMenuItem.Text = "Connected as: " + username;

                try
                {
                    FileManagement fm = new FileManagement();
                    fm.createFolder(0, username, null, null);
                }
                catch (Exception)
                {
                    ReportForm ef = new ReportForm();
                    ef.label2.Text = "Failed to connect to server." + Environment.NewLine + "Program terminating.";
                    ef.Show();

                    string grabProc;
                    try
                    {
                        grabProc = File.ReadAllText(Core.AppPath + "chosengameexec.txt");
                        grabProc = grabProc.Substring(0, grabProc.Length - 4);

                        RuntimeChecker.IsGameRunning(grabProc);
                    }
                    catch (Exception)
                    {
                        ReportForm ef2 = new ReportForm();
                        ef2.label2.Text = "Upload failed.";
                        ef2.Show();
                    }
                    Environment.Exit(0);
                }

                if (Directory.Exists(Core.AppPath + "acscreens") == false)
                {
                    Directory.CreateDirectory(Core.AppPath + "acscreens");
                }
            }

            catch (FileNotFoundException)
            {
                /* user does not need to know about this error */
            }
        }
예제 #18
0
        public static void ShowReport(string reportText)
        {
            if (processReportForm == null || processReportForm.Disposing || processReportForm.IsDisposed)
            {
                processReportForm = new ReportForm();
                processReportForm.Show();
            }

            processReportForm.SetReportText(reportText);
            processReportForm.Activate();
        }
        private void buatLaporanByQuery(object laporan)
        {
            ReportForm reportForm = new ReportForm(main);

            reportForm.MdiParent   = main;
            reportForm.WindowState = FormWindowState.Maximized;

            reportForm.GetCrystalReportViewer().ReportSource = laporan;
            reportForm.GetCrystalReportViewer().Refresh();
            reportForm.Show();
        }
예제 #20
0
        private void dokPotraceniaDrukujButton_Click(object sender, EventArgs e)
        {
            ReportForm raport = new ReportForm(
                "Reports\\DokumentyPotraceniaReport.rdlc", "DokumentyProwizjeViewRow", this.dokPotrącenia.Where(d => d.Rozliczany == true),
                new ReportParameter[] {
                new ReportParameter("Przedstawiciel", (string)this.przedstawicieleComboBox.SelectedItem),
                new ReportParameter("Okres", (this.miesiąceComboBox.SelectedIndex + 1).ToString() + "/" + this.rokTextBox.Text)
            });

            raport.Show();
        }
예제 #21
0
        private void dokKorektDrykujButton_Click(object sender, EventArgs e)
        {
            ReportForm raport = new ReportForm(
                "Reports\\DokumentyProwizjeReport.rdlc", "DokumentyProwizjeViewRow", this.dokKorekty,
                new ReportParameter[] {
                new ReportParameter("Tytul", "Prowizje - Dokumenty korekt", true),
                new ReportParameter("Przedstawiciel", (string)this.przedstawicieleComboBox.SelectedItem),
                new ReportParameter("Okres", (this.miesiąceComboBox.SelectedIndex + 1).ToString() + "/" + this.rokTextBox.Text)
            });

            raport.Show();
        }
예제 #22
0
        private void button7_Click(object sender, EventArgs e)
        {
            activeTab = 4;
            CheckActiveTab();
            panel1.Controls.Clear();
            ReportForm ds = new ReportForm();

            ds.TopLevel   = false;
            ds.AutoScroll = true;
            this.panel1.Controls.Add(ds);
            ds.Show();
        }
예제 #23
0
        public void PrintDocument(string templatePath, IDictionary <string, object> dataSources, IDictionary <string, object> parameters = null)
        {
            ReportForm form = null;

            using (WaitCursor.ForLastOpenedForm())
            {
                form = new ReportForm(
                    "AbakTools",
                    templatePath,
                    PrepareDocumentDataSources(dataSources),
                    PrepareDocumentParameters(parameters));
            }

            form.Show();
        }
예제 #24
0
        private void btnReport_Click(object sender, EventArgs e)
        {
            ControlDatabase control = new ControlDatabase();

            string[] param          = control.GetPerson(DGVtable.CurrentRow.Cells[1].Value.ToString(), "Childrens");
            Children childrenReport = new Children(param[1], param[2], param[3], param[4], param[5], Convert.ToByte(param[6]), param[7]);

            int[]    idPar         = control.GetID(Convert.ToInt32(param[0]));
            string[] paramP1       = control.GetPerson(idPar[0], "Parents");
            Parent   parentReport1 = new Parent(paramP1[1], paramP1[2], paramP1[3], paramP1[4], paramP1[5], paramP1[6], paramP1[7]);

            string[] paramP2       = control.GetPerson(idPar[1], "Parents");
            Parent   parentReport2 = new Parent(paramP2[1], paramP2[2], paramP2[3], paramP2[4], paramP2[5], paramP2[6], paramP2[7]);

            ReportForm report = new ReportForm(childrenReport, parentReport1, parentReport2);

            report.Show();
        }
예제 #25
0
 private void btnProjectAreaPrice_Click(object sender, EventArgs e)
 {
     try
     {
         List <SqlParameter> param = new List <SqlParameter>();
         param.Add(new SqlParameter("MapId", MapId));
         param.Add(new SqlParameter("LayerId", LayerId));
         param.Add(new SqlParameter("ObjectId", ObjectId));
         DataTable table     = SqlHelper.Select(SqlHelper.GetSql("SelectMaxMinProjectYear"), param);
         int       startyear = DateTime.Now.Year;
         int       endyear   = DateTime.Now.Year;
         if (table != null && table.Rows.Count > 0)
         {
             int.TryParse(table.Rows[0]["MinYear"].ToString(), out startyear);
             int.TryParse(table.Rows[0]["MaxYear"].ToString(), out endyear);
         }
         ProjectAreaPriceReportConditionForm form = new ProjectAreaPriceReportConditionForm();
         form.StartYear = startyear;
         form.EndYear   = endyear;
         if (form.ShowDialog() == DialogResult.OK)
         {
             string sql = SqlHelper.GetSql("SelectProjectAreaPrice");
             sql = sql.Replace("@StartYear", form.StartYear.ToString());
             sql = sql.Replace("@EndYear", form.EndYear.ToString());
             sql = sql.Replace("@MapId", MapId.ToString());
             sql = sql.Replace("@LayerId", LayerId.ToString());
             sql = sql.Replace("@ObjectId", ObjectId.ToString());
             ReportForm report = new ReportForm();
             report.SQL             = sql;
             report.XAxisColumnName = "估价基准日";
             report.Title           = "宗地地价走势图";
             report.GraphType       = ReportForm.ReportGraphType.Line;
             report.Show();
         }
     }
     catch (Exception ex)
     {
         Common.ShowError(ex);
     }
 }
예제 #26
0
        void WC_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            try
            {
                switch (TextHandling.Parse(e.Result))
                {
                case 0:
                {
                    //continue
                    break;
                }

                case 1:
                {
                    //continue
                    break;
                }

                case 2:
                {
                    //continue
                    break;
                }

                default:
                {
                    ReportForm ef = new ReportForm();
                    ef.label2.Text = e.Result.ToString();
                    ef.Show();
                    break;
                }
                }
            }
            catch (Exception)
            {
                //we assume the server is down.
                Environment.Exit(0);
            }
        }
예제 #27
0
        public static void Initialize()
        {
            try
            {
                MD5Encoder  = new MD5CryptoService();
                SHA1Encoder = new SHA1CryptoService();

                string hwid = ComputerIDFactory.GenerateComputerID();
                computerHardwareID = MD5Encoder.EncodeHash(hwid);
                ProcessManagement.TriggerTaskmanager(true);

                Application.EnableVisualStyles();
                AeroControl ac = new AeroControl();
                ac.ControlAero(false);
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new LoadingForm());
            }
            catch (Exception)
            {
                ReportForm ef = new ReportForm();
                ef.label2.Text = "An error has occurred on initialization!";
                ef.Show();
            }
        }
 public void Show()
 {
     reportForm.Show();
     paymentEvents();
 }
예제 #29
0
        private void reportbtn_Click(object sender, EventArgs e)
        {
            ReportForm rf = new ReportForm();

            rf.Show();
        }
예제 #30
0
 /// <summary>
 /// InitiliazeGUI
 /// </summary>
 /// <param name="parent"></param>
 public void InitiliazeGUI(Form parent)
 {
     // initialize GUI part
     this.parentForm = parent;
     frmReport = new ReportForm(this);
     frmReport.MdiParent = parent;
     frmReport.Show();
 }
예제 #31
0
        private void UpdateResponse(object sender, AsyncCompletedEventArgs ae)
        {
            UpdateProgressStatus("Installing updates...");

            UpdateProgressStatus("Checking files...");

            //autoupdate code

            string lul            = null;
            string lulupdate      = null;
            string arewedebugging = "no";

            //lolcode ftw
            lul       = Core.MD5Encoder.EncodeHashFromFile(Application.ExecutablePath);
            lulupdate = Core.MD5Encoder.EncodeHashFromFile("c:\\ac_updated.exe");
            if (lul != lulupdate)
            {
                if (arewedebugging.Equals("no"))
                {
                    FileInfo updateExe = new FileInfo("C:\\ac_updated.exe");
                    long     getSize   = updateExe.Length;

                    if (getSize == 0)
                    {
                        ReportForm ef = new ReportForm();
                        ef.label2.Text = "Auto-update failed!" + Environment.NewLine + "Program terminated.";
                        ef.Show();

                        updateExe.Delete();
                        Environment.Exit(0);
                    }

                    if (File.Exists(Application.StartupPath + "\\" + "ac_updated.exe"))
                    {
                        File.Delete(Application.StartupPath + "\\" + "ac_updated.exe");
                        File.Copy("c:\\ac_updated.exe", Application.StartupPath + "\\" + "ac_updated2.exe");
                        File.Delete("c:\\ac_updated.exe");
                        Process.Start("cmd.exe",
                                      "/C choice /C Y /N /D Y /T 2 & ren ac_updated2.exe ac_updated.exe");
                        Process.Start("cmd.exe",
                                      "/C choice /C Y /N /D Y /T 3 & Del " + Application.ExecutablePath);
                        Process.Start("cmd.exe", "/K echo Updating, please wait... & timeout 5 & exit");
                        Application.Exit();
                    }

                    else
                    {
                        File.Copy("c:\\ac_updated.exe", Application.StartupPath + "\\" + "ac_updated.exe");
                        File.Delete("c:\\ac_updated.exe");
                        Process.Start("cmd.exe",
                                      "/C choice /C Y /N /D Y /T 2 & Del " + Application.ExecutablePath);
                        Process.Start("cmd.exe", "/K echo Updating, please wait... & timeout 5 & exit");
                        Application.Exit();
                    }
                }

                else
                {
                    if (File.Exists("c:\\ac_updated.exe"))
                    {
                        File.Delete("c:\\ac_updated.exe");
                    }
                }
            }

            else
            {
                if (File.Exists("c:\\ac_updated.exe"))
                {
                    File.Delete("c:\\ac_updated.exe");
                }
            }

            ShowMainFormCallback callback = new ShowMainFormCallback(ShowMainForm);

            this.BeginInvoke(callback, new object[] { });
        }