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.
125 lines
3.7 KiB
125 lines
3.7 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using DevExpress.XtraEditors;
|
|
using System.Data.SqlClient;
|
|
using ICSSoft.Frame.Data.BLL;
|
|
using ICSSoft.Base.Language.Tool;
|
|
using ICSSoft.Base.UserControl.MessageControl;
|
|
using ICSSoft.Base.Report.Filter;
|
|
using ICSSoft.Base.Config.DBHelper;
|
|
using ICSSoft.Base.UserControl.FormControl;
|
|
using ICSSoft.Base.ReferForm.AppReferForm;
|
|
using ICSSoft.Base.Lable.PrintTool;
|
|
using ICSSoft.Base.Config.AppConfig;
|
|
using ICSSoft.Base.Report.GridReport;
|
|
using ICSSoft.Frame.APP.Entity;
|
|
using ICSSoft.Frame.APP;
|
|
|
|
|
|
|
|
namespace ICSSoft.Frame.APP
|
|
{
|
|
public partial class FormICSERPVendor : DevExpress.XtraEditors.XtraForm
|
|
{
|
|
FormICSEQPSTPUIModelNew EQPSTPUIModel;
|
|
int flag;
|
|
string eqpstpid;
|
|
public string vencode;
|
|
public FormICSERPVendor()
|
|
{
|
|
InitializeComponent();
|
|
init();
|
|
flag = 0;
|
|
eqpstpid = AppConfig.GetGuid();
|
|
}
|
|
public FormICSERPVendor(string id)
|
|
{
|
|
InitializeComponent();
|
|
init();
|
|
flag = 1;
|
|
eqpstpid = id;
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnOK_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
|
|
if (Vendorcode.Text == "") {
|
|
ICSBaseSimpleCode.AppshowMessageBox("请先选择供应商编码!");
|
|
return;
|
|
}
|
|
this.vencode = Vendorcode.Text;
|
|
this.DialogResult = DialogResult.OK;
|
|
}
|
|
catch (Exception ex) {
|
|
MessageBox.Show(ex.Message);
|
|
}
|
|
}
|
|
#region 关闭
|
|
private void btnCancle_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
this.DialogResult = DialogResult.Cancel;
|
|
}
|
|
|
|
private void btnClose_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
this.DialogResult = DialogResult.Cancel;
|
|
}
|
|
#endregion
|
|
|
|
|
|
private void gluItemCode_EditValueChanged(object sender, EventArgs e)
|
|
{
|
|
var o = Vendorcode.Properties.GetRowByKeyValue(Vendorcode.EditValue);
|
|
if (o is DataRowView)
|
|
{
|
|
DataRowView RowView = o as DataRowView;
|
|
vendorname.Text = RowView.Row["供应商名称"].ToString();
|
|
}
|
|
|
|
}
|
|
|
|
#region 初始化查询条件
|
|
private void init()
|
|
{
|
|
#region 存货编码
|
|
string sql = "select distinct cVenCode as 供应商编码,cVenName as 供应商名称 from Vendor";
|
|
DataTable dt = DBHelper.ExecuteDataset(AppConfig.GetDataBaseConnectStringByKey("[DB.ERP]"), CommandType.Text, sql).Tables[0];
|
|
Vendorcode.Properties.ValueMember = "供应商编码";
|
|
Vendorcode.Properties.DisplayMember = "供应商编码";
|
|
Vendorcode.Properties.DataSource = dt;
|
|
Vendorcode.Properties.NullText = "";//空时的值
|
|
Vendorcode.Properties.ImmediatePopup = true;//输入值是否马上弹出窗体
|
|
Vendorcode.Properties.ValidateOnEnterKey = true;//回车确认
|
|
Vendorcode.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard;//要使用户可以输入,这里须设为Standard
|
|
Vendorcode.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.True; //可用Ctrl + Delete清空选择內容
|
|
//自适应宽度
|
|
Vendorcode.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
|
|
#endregion
|
|
|
|
|
|
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|