示例#1
0
        public void ClearAllUserInput()
        {
            #region Clear All User Input
            textBoxAccountID.Text      = null;
            textBoxAccountName.Text    = null;
            textBoxAccountAlias.Text   = null;
            textBoxAccountPhone.Text   = null;
            textBoxAccountCompany.Text = null;
            textBoxAccountAddress.Text = null;
            textBoxAccountEmail.Text   = null;
            textBoxAccountGender.Text  = null;
            textBoxAccountType.Text    = null;
            textBoxAccountNote.Text    = null;
            textBoxAccountSearch.Text  = null;

            DataTable dataTable = sqLGetData.AccountList();
            DataGridViewAccount(dataTable);
            #endregion
        }
示例#2
0
 public FormAccountReport(bool Mode)
 {
     InitializeComponent();
     if (Mode == true)
     {
         System.Drawing.Printing.PageSettings pageSettings = new System.Drawing.Printing.PageSettings();
         SettingPagePotrait(pageSettings);
         reportAccountDetail.SetPageSettings(pageSettings);
         DataTable dataTable = sqLGetData.AccountSearch(FormAccount.Forms.textBoxAccountID.Text);
         reportAccountDetail.LocalReport.DataSources.Clear();
         reportAccountDetail.LocalReport.DataSources.Add(new ReportDataSource("ReportDataSet", dataTable));
         reportAccountDetail.LocalReport.ReportEmbeddedResource = "ArlixAJP.Account.ReportAccountDetail.rdlc";
         ReportParameter[] reportParameters = new ReportParameter[4];
         reportParameters[0] = new ReportParameter("ReParCompName", Properties.Settings.Default.CompName, true);
         reportParameters[1] = new ReportParameter("ReParCompAddress", Properties.Settings.Default.CompAddress, true);
         reportParameters[2] = new ReportParameter("ReParCompPhone", Properties.Settings.Default.CompPhone, true);
         reportParameters[3] = new ReportParameter("ReParCompEmail", Properties.Settings.Default.CompEmail, true);
         reportAccountDetail.LocalReport.SetParameters(reportParameters);
         reportAccountDetail.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
         reportAccountDetail.RefreshReport();
     }
     else
     {
         System.Drawing.Printing.PageSettings pageSettings = new System.Drawing.Printing.PageSettings();
         SettingPageLandScape(pageSettings);
         reportAccountDetail.SetPageSettings(pageSettings);
         DataTable dataTable = sqLGetData.AccountList();
         reportAccountDetail.LocalReport.DataSources.Clear();
         reportAccountDetail.LocalReport.DataSources.Add(new ReportDataSource("ReportDataSet", dataTable));
         reportAccountDetail.LocalReport.ReportEmbeddedResource = "ArlixAJP.Account.ReportAccount.rdlc";
         ReportParameter[] reportParameters = new ReportParameter[4];
         reportParameters[0] = new ReportParameter("ReParCompName", Properties.Settings.Default.CompName, true);
         reportParameters[1] = new ReportParameter("ReParCompAddress", Properties.Settings.Default.CompAddress, true);
         reportParameters[2] = new ReportParameter("ReParCompPhone", Properties.Settings.Default.CompPhone, true);
         reportParameters[3] = new ReportParameter("ReParCompEmail", Properties.Settings.Default.CompEmail, true);
         reportAccountDetail.LocalReport.SetParameters(reportParameters);
         reportAccountDetail.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
         reportAccountDetail.RefreshReport();
     }
 }