Esempio n. 1
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender">控件对象</param>
        /// <param name="e">事件参数</param>
        private void BtnQuery_Click(object sender, EventArgs e)
        {
            try
            {
                DateTime bdate           = Convert.ToDateTime(sdtDate.Bdate.Value.ToString("yyyy-MM-dd 00:00:00"));
                DateTime edate           = Convert.ToDateTime(sdtDate.Edate.Value.ToString("yyyy-MM-dd 23:59:59"));
                int      queryWorkId     = Convert.ToInt32(cmbWorker.SelectedValue);
                string   currentUserName = (string)InvokeController("GetCurrentUserName");
                int      queryType       = 0;//0收入流水账 1预交金流水账
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                if (superTabControl1.SelectedTabIndex == 0)
                {
                    GVResultRevenue.Stop();
                    this.Cursor = Cursors.WaitCursor;
                    DataTable dtReport = (DataTable)InvokeController("GetFinacialIPAccountBookData", frmName, bdate, edate, queryWorkId, queryType);

                    myDictionary.Add("Title", cmbWorker.Text.Trim() + "住院收入流水账");
                    myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
                    myDictionary.Add("Printer", currentUserName);
                    decimal[] beginEnd = GetBeginAndEnd(0, dtReport);
                    myDictionary.Add("BeginFeeTotal", beginEnd[0]);
                    myDictionary.Add("EndFeeTotal", beginEnd[1]);
                    GridReport gridreport = new GridReport();
                    gridreport             = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3012, 0, myDictionary, dtReport);
                    GVResultRevenue.Report = gridreport.Report;
                    GVResultRevenue.Start();
                    GVResultRevenue.Refresh();
                }
                else
                {
                    queryType = 1;
                    GVResultDeposit.Stop();
                    this.Cursor = Cursors.WaitCursor;
                    DataTable dtReport = (DataTable)InvokeController("GetFinacialIPAccountBookData", frmName, bdate, edate, queryWorkId, queryType);

                    myDictionary.Add("Title", cmbWorker.Text.Trim() + "住院预交金流水账");
                    myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
                    myDictionary.Add("Printer", currentUserName);
                    decimal[] beginEnd = GetBeginAndEnd(1, dtReport);
                    myDictionary.Add("BeginFeeTotal", beginEnd[0]);
                    myDictionary.Add("EndFeeTotal", beginEnd[1]);
                    GridReport gridreport = new GridReport();
                    gridreport             = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3013, 0, myDictionary, dtReport);
                    GVResultDeposit.Report = gridreport.Report;
                    GVResultDeposit.Start();
                    GVResultDeposit.Refresh();
                }
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 打印
 /// </summary>
 /// <param name="sender">控件对象</param>
 /// <param name="e">事件参数</param>
 private void BtnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (superTabControl1.SelectedTabIndex == 0)
         {
             GVResultRevenue.PostColumnLayout();
             GVResultRevenue.Report.PrintPreview(true);
         }
         else
         {
             GVResultDeposit.PostColumnLayout();
             GVResultDeposit.Report.PrintPreview(true);
         }
     }
     catch (Exception error)
     {
         MessageBoxEx.Show(error.Message);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 窗体关闭事件
 /// </summary>
 /// <param name="sender">控件对象</param>
 /// <param name="e">事件参数</param>
 private void FrmIPAccountBook_FormClosed(object sender, FormClosedEventArgs e)
 {
     GVResultRevenue.Stop();
     GVResultDeposit.Stop();
 }