719dbd49d2
Added Void or Reprint Report. Changed Product.SalePrice -> Price Changed Inventory.Rate -> Price
77 lines
2.3 KiB
C#
77 lines
2.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Windows.Forms;
|
|
using Tanshu.Accounts.Repository;
|
|
using Tanshu.Accounts.Contracts;
|
|
|
|
namespace Tanshu.Accounts.Management
|
|
{
|
|
public partial class QuantityForm : Form
|
|
{
|
|
IList<BillDetail> _list;
|
|
//private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
public QuantityForm()
|
|
{
|
|
InitializeComponent();
|
|
//log.Warn(string.Format("Sales Analysis by: {0}", Session.User.Name));
|
|
}
|
|
|
|
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
|
{
|
|
ShowStatement();
|
|
}
|
|
|
|
private void ShowStatement()
|
|
{
|
|
_list = new SalesAnalysisBI().GetBillDetails(dtpStart.Value, dtpFinish.Value);
|
|
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();
|
|
}
|
|
|
|
private void Sale_Analysis_Form_Load(object sender, EventArgs e)
|
|
{
|
|
dtpStart.Value = DateTime.Today;
|
|
dtpFinish.Value = DateTime.Today;
|
|
ShowStatement();
|
|
}
|
|
|
|
private void btnGo_Click(object sender, EventArgs e)
|
|
{
|
|
string type = null;
|
|
if (rbLight.Checked)
|
|
{
|
|
type = "Light";
|
|
}
|
|
else if (rbPremium.Checked)
|
|
{
|
|
type = "Premium";
|
|
}
|
|
else if (rbWheat.Checked)
|
|
{
|
|
type = "Wheat";
|
|
}
|
|
else if (rbDark.Checked)
|
|
{
|
|
type = "Dark";
|
|
}
|
|
else if (rbFestival.Checked)
|
|
{
|
|
type = "Festival";
|
|
}
|
|
MessageBox.Show(GetQuantity(type).ToString());
|
|
}
|
|
private decimal GetQuantity(string type)
|
|
{
|
|
""
|
|
}
|
|
}
|
|
}
|