Example #1
0
        private void btnExport_Click(object sender, RoutedEventArgs e)
        {
            ispaging           = false;
            dialog.Filter      = "MS csv Files|*.csv";
            dialog.FilterIndex = 1;
            result             = dialog.ShowDialog();
            if (result.Value == true)
            {
                loadbar.Start();
                int    pageCount = 0;
                string filter    = "";
                System.Collections.ObjectModel.ObservableCollection <object> paras = new System.Collections.ObjectModel.ObservableCollection <object>();

                string month = months.Value.ToString();
                string year  = years.Value.ToString();

                if (!string.IsNullOrEmpty(year))
                {
                    filter = " salaryyear==@" + paras.Count.ToString();
                    paras.Add(year);
                }

                if (!string.IsNullOrEmpty(month))
                {
                    if (!string.IsNullOrEmpty(filter))
                    {
                        filter += " and ";
                    }
                    filter += " salarymonth==@" + paras.Count.ToString();
                    paras.Add(month);
                }
                salaryClient.ExportMonthDeductionTaxsAsync(dataPager.PageIndex, dataPager.PageSize, "EMPLOYEENAME",
                                                           filter, paras, pageCount, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID, false);
            }
        }