Added FullPrice column to display Happy Hour Pricing.

Added Void or Reprint Report.
Changed Product.SalePrice -> Price
Changed Inventory.Rate -> Price
This commit is contained in:
unknown
2011-08-28 17:47:15 +05:30
parent 831ec37cda
commit 719dbd49d2
26 changed files with 850 additions and 1179 deletions

View File

@ -0,0 +1,76 @@
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)
{
""
}
}
}

View File

@ -0,0 +1,198 @@
namespace Tanshu.Accounts.Management
{
partial class QuantityForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.dtpFinish = new System.Windows.Forms.DateTimePicker();
this.dtpStart = new System.Windows.Forms.DateTimePicker();
this.label10 = new System.Windows.Forms.Label();
this.flpProducts = new System.Windows.Forms.FlowLayoutPanel();
this.rbLight = new System.Windows.Forms.RadioButton();
this.rbPremium = new System.Windows.Forms.RadioButton();
this.rbWheat = new System.Windows.Forms.RadioButton();
this.rbDark = new System.Windows.Forms.RadioButton();
this.rbFestival = new System.Windows.Forms.RadioButton();
this.txtQuantity = new System.Windows.Forms.TextBox();
this.btnGo = new System.Windows.Forms.Button();
this.flpProducts.SuspendLayout();
this.SuspendLayout();
//
// dtpFinish
//
this.dtpFinish.CustomFormat = "dd-MMM-yyyy";
this.dtpFinish.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpFinish.Location = new System.Drawing.Point(168, 12);
this.dtpFinish.Name = "dtpFinish";
this.dtpFinish.Size = new System.Drawing.Size(90, 20);
this.dtpFinish.TabIndex = 21;
this.dtpFinish.ValueChanged += new System.EventHandler(this.dtpFinish_ValueChanged);
//
// dtpStart
//
this.dtpStart.CustomFormat = "dd-MMM-yyyy";
this.dtpStart.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpStart.Location = new System.Drawing.Point(12, 12);
this.dtpStart.Name = "dtpStart";
this.dtpStart.Size = new System.Drawing.Size(90, 20);
this.dtpStart.TabIndex = 20;
this.dtpStart.ValueChanged += new System.EventHandler(this.dtpStart_ValueChanged);
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(108, 16);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(54, 13);
this.label10.TabIndex = 22;
this.label10.Text = "<- Date ->";
//
// flpProducts
//
this.flpProducts.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flpProducts.Controls.Add(this.rbLight);
this.flpProducts.Controls.Add(this.rbPremium);
this.flpProducts.Controls.Add(this.rbWheat);
this.flpProducts.Controls.Add(this.rbDark);
this.flpProducts.Controls.Add(this.rbFestival);
this.flpProducts.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flpProducts.Location = new System.Drawing.Point(12, 38);
this.flpProducts.Name = "flpProducts";
this.flpProducts.Size = new System.Drawing.Size(335, 137);
this.flpProducts.TabIndex = 23;
//
// rbLight
//
this.rbLight.AutoSize = true;
this.rbLight.Location = new System.Drawing.Point(3, 3);
this.rbLight.Name = "rbLight";
this.rbLight.Size = new System.Drawing.Size(48, 17);
this.rbLight.TabIndex = 0;
this.rbLight.TabStop = true;
this.rbLight.Text = "Light";
this.rbLight.UseVisualStyleBackColor = true;
//
// rbPremium
//
this.rbPremium.AutoSize = true;
this.rbPremium.Location = new System.Drawing.Point(3, 26);
this.rbPremium.Name = "rbPremium";
this.rbPremium.Size = new System.Drawing.Size(65, 17);
this.rbPremium.TabIndex = 1;
this.rbPremium.TabStop = true;
this.rbPremium.Text = "Premium";
this.rbPremium.UseVisualStyleBackColor = true;
//
// rbWheat
//
this.rbWheat.AutoSize = true;
this.rbWheat.Location = new System.Drawing.Point(3, 49);
this.rbWheat.Name = "rbWheat";
this.rbWheat.Size = new System.Drawing.Size(57, 17);
this.rbWheat.TabIndex = 2;
this.rbWheat.TabStop = true;
this.rbWheat.Text = "Wheat";
this.rbWheat.UseVisualStyleBackColor = true;
//
// rbDark
//
this.rbDark.AutoSize = true;
this.rbDark.Location = new System.Drawing.Point(3, 72);
this.rbDark.Name = "rbDark";
this.rbDark.Size = new System.Drawing.Size(48, 17);
this.rbDark.TabIndex = 3;
this.rbDark.TabStop = true;
this.rbDark.Text = "Dark";
this.rbDark.UseVisualStyleBackColor = true;
//
// rbFestival
//
this.rbFestival.AutoSize = true;
this.rbFestival.Location = new System.Drawing.Point(3, 95);
this.rbFestival.Name = "rbFestival";
this.rbFestival.Size = new System.Drawing.Size(61, 17);
this.rbFestival.TabIndex = 4;
this.rbFestival.TabStop = true;
this.rbFestival.Text = "Festival";
this.rbFestival.UseVisualStyleBackColor = true;
//
// txtQuantity
//
this.txtQuantity.Location = new System.Drawing.Point(12, 181);
this.txtQuantity.Name = "txtQuantity";
this.txtQuantity.Size = new System.Drawing.Size(335, 20);
this.txtQuantity.TabIndex = 5;
//
// btnGo
//
this.btnGo.Location = new System.Drawing.Point(12, 207);
this.btnGo.Name = "btnGo";
this.btnGo.Size = new System.Drawing.Size(335, 23);
this.btnGo.TabIndex = 24;
this.btnGo.Text = "Go";
this.btnGo.UseVisualStyleBackColor = true;
this.btnGo.Click += new System.EventHandler(this.btnGo_Click);
//
// QuantityForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(359, 242);
this.Controls.Add(this.btnGo);
this.Controls.Add(this.flpProducts);
this.Controls.Add(this.dtpFinish);
this.Controls.Add(this.dtpStart);
this.Controls.Add(this.label10);
this.Controls.Add(this.txtQuantity);
this.MaximizeBox = false;
this.Name = "QuantityForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Sale Analysis Form";
this.Load += new System.EventHandler(this.Sale_Analysis_Form_Load);
this.flpProducts.ResumeLayout(false);
this.flpProducts.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DateTimePicker dtpFinish;
private System.Windows.Forms.DateTimePicker dtpStart;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.FlowLayoutPanel flpProducts;
private System.Windows.Forms.RadioButton rbLight;
private System.Windows.Forms.RadioButton rbPremium;
private System.Windows.Forms.RadioButton rbWheat;
private System.Windows.Forms.RadioButton rbDark;
private System.Windows.Forms.RadioButton rbFestival;
private System.Windows.Forms.TextBox txtQuantity;
private System.Windows.Forms.Button btnGo;
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>