2011-08-28 12:17:15 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Tanshu.Accounts.Repository;
|
|
|
|
|
using Tanshu.Accounts.Contracts;
|
|
|
|
|
using Tanshu.Accounts.Helpers;
|
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.PointOfSale
|
|
|
|
|
{
|
|
|
|
|
public partial class VoidReprintedForm : Form
|
|
|
|
|
{
|
|
|
|
|
IList<BillDetail> _list;
|
|
|
|
|
public VoidReprintedForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
ShowStatement();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ShowStatement()
|
|
|
|
|
{
|
2014-10-16 11:11:55 +00:00
|
|
|
|
if (DateTime.Today.Subtract(dtpStart.Value.Date).Days > 5 && !Session.IsAllowed("Accounts Audit"))
|
2011-12-05 09:41:02 +00:00
|
|
|
|
return;
|
2014-11-11 10:23:54 +00:00
|
|
|
|
_list = new ReportsBI().VoidOrReprintedBillsList(dtpStart.Value, dtpFinish.Value);
|
2011-08-28 12:17:15 +00:00
|
|
|
|
dgvSale.AutoGenerateColumns = true;
|
|
|
|
|
dgvSale.DataSource = _list;
|
|
|
|
|
dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
|
|
|
|
dgvSale.Columns[1].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
|
|
|
|
dgvSale.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void dtpFinish_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
ShowStatement();
|
|
|
|
|
}
|
|
|
|
|
|
2016-07-04 06:21:39 +00:00
|
|
|
|
private void VoidReprintedForm_Load(object sender, EventArgs e)
|
2011-08-28 12:17:15 +00:00
|
|
|
|
{
|
|
|
|
|
dtpStart.Value = DateTime.Today;
|
|
|
|
|
dtpFinish.Value = DateTime.Today;
|
|
|
|
|
ShowStatement();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|