You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.1 KiB
58 lines
2.1 KiB
using System;
|
|
using System.Windows.Controls;
|
|
|
|
|
|
namespace SSWMS.Client.UC
|
|
{
|
|
/// <summary>
|
|
/// ucGoodsMain.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class ucGoodsMain : UserControl
|
|
{
|
|
public int U_GoodsID
|
|
{
|
|
|
|
get
|
|
{
|
|
if (this.cmbGoodsMainSelect.SelectedValue != null)
|
|
return Convert.ToInt32(this.cmbGoodsMainSelect.SelectedValue);
|
|
else
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
public ucGoodsMain()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void U_InitControl()
|
|
{
|
|
//初始化数据
|
|
this.cmbGoodsMainSelect.DisplayMemberPath = "NAME";
|
|
this.cmbGoodsMainSelect.SelectedValuePath = "GOODS_ID";
|
|
//this.cmbGoodsMainSelect.ItemsSource = WCFServiceModel._I_GoodsService.GoodsGetListGoodsClassID(intGoodsClassID);
|
|
this.cmbGoodsMainSelect.ItemsSource = WCFChannel._I_BaseService.GetDataTable("select '编码:'+GOODS_CODE+'----描述:'+GOODS_NAME+'----类型:'+GOODS_CLASS_NAME as NAME,GOODS_ID from V_GOODS where GOODS_CLASS_ID!=16 AND GOODS_FLAG='1' ORDER BY GOODS_CLASS_ID").DefaultView;
|
|
//this.cmbStockType.SelectionChanged += new SelectionChangedEventHandler(cmbStockType_SelectionChanged);
|
|
this.cmbGoodsMainSelect.SelectedValue = -1;
|
|
|
|
|
|
this.cmbQualified.DisplayMemberPath = "NAME";
|
|
this.cmbQualified.SelectedValuePath = "CODE";
|
|
this.cmbQualified.ItemsSource = WCFChannel._I_BaseService.GetDataTable("SELECT ITEM_LIST_CODE AS CODE,ITEM_LIST_NAME AS NAME FROM V_SYS_ITEM WHERE ITEM_CODE='GOODS_Qualified' ORDER BY ITEM_LIST_ORDER").DefaultView;
|
|
this.cmbQualified.SelectedValue = 1;
|
|
|
|
}
|
|
|
|
private void cmbGoodsMainSelect_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
System.Data.DataRowView drv = (System.Data.DataRowView)cmbGoodsMainSelect.SelectedItem;
|
|
|
|
|
|
this.textGoodsInfo.Text = drv.Row["NAME"].ToString();
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|