Пример #1
0
        private void SetDataSource(ReportDocument Report)
        {
            ReportDataset rptds = new ReportDataset();

            DateTime ActivityDateFrom = DateTime.TryParse(txtStartTransactionDate.Text + " 00:00", out ActivityDateFrom) ? ActivityDateFrom : Constants.C_DATE_MIN_VALUE;
            DateTime ActivityDateTo   = DateTime.TryParse(txtEndTransactionDate.Text + " 23:59", out ActivityDateTo) ? ActivityDateTo : Constants.C_DATE_MIN_VALUE;

            CashierLogs clsCashierLogs = new CashierLogs();

            System.Data.DataTable dt = clsCashierLogs.LoginLogoutReport(ActivityDateFrom, ActivityDateTo, null);
            clsCashierLogs.CommitAndDispose();

            foreach (System.Data.DataRow dr in dt.Rows)
            {
                DataRow drLoginLogout = rptds.LoginLogout.NewRow();

                foreach (DataColumn dc in rptds.LoginLogout.Columns)
                {
                    drLoginLogout[dc] = dr[dc.ColumnName];
                }

                rptds.LoginLogout.Rows.Add(drLoginLogout);
            }

            Report.SetDataSource(rptds);

            SetParameters(Report);
        }
Пример #2
0
        private bool InitializeBeginningCashierID()
        {
            CashierLogsDetails clsLogDetails = new CashierLogsDetails();

            clsLogDetails.CashierID  = miCashierID;
            clsLogDetails.LoginDate  = DateTime.Now;
            clsLogDetails.BranchID   = Constants.TerminalBranchID;
            clsLogDetails.TerminalNo = CompanyDetails.TerminalNo;
            clsLogDetails.IPAddress  = System.Net.Dns.GetHostName();
            clsLogDetails.Status     = CashierLogStatus.LoggedIn;

            CashierLogs clsCashierLogs = new CashierLogs();

            clsCashierLogs.UpdateBeginningBalance(clsLogDetails, Convert.ToDecimal(txtAmount.Text));
            clsCashierLogs.CommitAndDispose();
            return(true);
        }