Example #1
0
        private void visaÄndringsloggToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ChangelogForm tempfrm = new ChangelogForm();

            tempfrm.Show();
        }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'kassasystem_DataSet.Artiklar' table. You can move, or remove it, as needed.


            if (Inställningar.Default.bHasSeenNotes == true)
            {
                //this.t_SALJARETableAdapter.Fill(pengvinDataset.T_SALJARE);

                //this.ReparationsunderlagTableAdapter.Fill(DataSet1.Reparationsunderlag);

                //this.artiklarTableAdapter.Fill(this.kassasystem_DataSet.Artiklar);

                string DokumentID      = dokumentIDTextBox.Text;
                string CurrentDate     = dokumentDatumDateTimePicker.Text;
                string Supplier        = SupplierTextBox.Text;
                string CustomerID      = kundIDTextBox.Text;
                string CustomerContact = kundkontaktTextBox.Text;
                string Phonenumber     = telefonnummerTextBox.Text;
                string Serialnumber    = serienummerTextBox.Text;
                string Errordesc       = felbeskrivningTextBox.Text;
                string Email           = epostTextBox.Text;

                if (GarantiBox.Checked == true)
                {
                    GlobalVariables.GarantiChecked = "Ja";
                }
                else
                {
                    GlobalVariables.GarantiChecked = "Nej";
                }

                string User        = användareComboBox.Text;
                string Mark        = märkeTextBox.Text;
                string MachineType = maskintypTextBox.Text;

                ReportParameter r1  = new ReportParameter("SelectedDokID", DokumentID);
                ReportParameter r2  = new ReportParameter("SelectedDate", CurrentDate);
                ReportParameter r3  = new ReportParameter("SelectedSupplier", Supplier);
                ReportParameter r4  = new ReportParameter("SelectedCustomer", CustomerID);
                ReportParameter r5  = new ReportParameter("SelectedContact", CustomerContact);
                ReportParameter r6  = new ReportParameter("SelectedPhonenumber", Phonenumber);
                ReportParameter r7  = new ReportParameter("SelectedSerialnumber", Serialnumber);
                ReportParameter r8  = new ReportParameter("SelectedErrorDescription", Errordesc);
                ReportParameter r9  = new ReportParameter("SelectedEmail", Email);
                ReportParameter r10 = new ReportParameter("SelectedWarranty", GlobalVariables.GarantiChecked);
                ReportParameter r11 = new ReportParameter("SelectedStaffID", User);
                ReportParameter r12 = new ReportParameter("SelectedMark", Mark);
                ReportParameter r13 = new ReportParameter("SelectedMachinetype", MachineType);
                reportViewer1.ServerReport.SetParameters(new ReportParameter[] { r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13 });



                this.reportViewer1.RefreshReport();
                this.ReparationsunderlagBindingSource.MoveLast();
            }
            else if (Inställningar.Default.bHasSeenNotes == false)
            {
                //this.t_SALJARETableAdapter.Fill(this.pengvinDataset.T_SALJARE);

                // this.ReparationsunderlagTableAdapter.Fill(this.DataSet1.Reparationsunderlag);



                //this.artiklarTableAdapter.Fill(this.kassasystem_DataSet.Artiklar);


                string DokumentID      = dokumentIDTextBox.Text;
                string CurrentDate     = dokumentDatumDateTimePicker.Text;
                string Supplier        = SupplierTextBox.Text;
                string CustomerID      = kundIDTextBox.Text;
                string CustomerContact = kundkontaktTextBox.Text;
                string Phonenumber     = telefonnummerTextBox.Text;
                string Serialnumber    = serienummerTextBox.Text;
                string Errordesc       = felbeskrivningTextBox.Text;
                string Email           = epostTextBox.Text;
                if (GarantiBox.Checked == true)
                {
                    GlobalVariables.GarantiChecked = "Ja";
                }
                else
                {
                    GlobalVariables.GarantiChecked = "Nej";
                }
                string User        = användareComboBox.Text;
                string Mark        = märkeTextBox.Text;
                string MachineType = maskintypTextBox.Text;

                ReportParameter r1  = new ReportParameter("SelectedDokID", DokumentID);
                ReportParameter r2  = new ReportParameter("SelectedDate", CurrentDate);
                ReportParameter r3  = new ReportParameter("SelectedSupplier", Supplier);
                ReportParameter r4  = new ReportParameter("SelectedCustomer", CustomerID);
                ReportParameter r5  = new ReportParameter("SelectedContact", CustomerContact);
                ReportParameter r6  = new ReportParameter("SelectedPhonenumber", Phonenumber);
                ReportParameter r7  = new ReportParameter("SelectedSerialnumber", Serialnumber);
                ReportParameter r8  = new ReportParameter("SelectedErrorDescription", Errordesc);
                ReportParameter r9  = new ReportParameter("SelectedEmail", Email);
                ReportParameter r10 = new ReportParameter("SelectedWarranty", GlobalVariables.GarantiChecked);
                ReportParameter r11 = new ReportParameter("SelectedStaffID", User);
                ReportParameter r12 = new ReportParameter("SelectedMark", Mark);
                ReportParameter r13 = new ReportParameter("SelectedMachinetype", MachineType);
                reportViewer1.ServerReport.SetParameters(new ReportParameter[] { r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13 });



                this.reportViewer1.RefreshReport();
                this.ReparationsunderlagBindingSource.MoveLast();



                ChangelogForm tempfrm = new ChangelogForm();
                tempfrm.Show();
            }
        }