narsil/Tanshu.Accounts.PointOfSale/ProductNewRates.cs
2010-03-02 23:26:21 +05:30

53 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Accounts.Proxy;
using Tanshu.Common;
using Accounts.BusinessObjects;
namespace Accounts.PointOfSale
{
public partial class ProductNewRates : Form
{
public ProductNewRates()
{
InitializeComponent();
}
private void ProductNewRates_Load(object sender, EventArgs e)
{
UserBO user = Accounts.Security.CurrentUser.user;
cmbItem.DataSource = Accounts.Proxy.ProductProxy.GetProducts("", 0, 0, user.CompanyID, true, false);
cmbItem.DisplayMember = "Name";
cmbItem.ValueMember = "ProductID";
}
private void ProductNewRates_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F7)
{
using (SelectProduct selectProduct = new SelectProduct(Accounts.Proxy.ProductProxy.GetPurchaseProductList(), true))
{
selectProduct.ShowDialog();
if (selectProduct.SelectedItem != null)
{
cmbItem.SelectedValue = selectProduct.SelectedItem.productID;
txtNewRate.Tag = selectProduct.SelectedItem.Price.ToString();
btnSave.Focus();
}
}
}
}
private void cmbItem_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}