| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- 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 com.hnshituo.pur.vo;
- using Core.Mes.Client.Comm.Control;
- using CoreFS.CA06;using Pur.Entity;
- using Pur.Entity.configureEntity;
- using Infragistics.Win;
- using Pur.Entity;
- namespace Pur.configure
- {
- public partial class frmSuppSel : FrmPmsBase
- {
- public frmSuppSel(OpeBase ob)
- {
- InitializeComponent();
- this.ob = ob;
- Query();
- ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = DefaultableBoolean.False;
- }
- private string SUPP_NAME;
- public string strSUPP_NAME
- {
- get { return SUPP_NAME; }
- }
- private string SUPP_CODE;
- public string strSUPP_CODE
- {
- get { return SUPP_CODE; }
- }
- private string SUPP_TAX_RATE;
- public string strSUPP_TAX_RATE
- {
- get { return SUPP_TAX_RATE; }
- }
- /// <summary>
- /// 获取供应商
- /// </summary>
- private void getSupp(DataTable dt)
- {
- dataTable1.Rows.Clear();
- GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);//绑定物料分类表
- for (int i = 0; i < ultraGrid1.Rows.Count; i++)
- {
- ultraGrid1.Rows[i].Cells["col_sel"].Value = "选择..";
- }
- }
- /// <summary>
- /// 单击选择按钮
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGrid1_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
- {
- conFirmation();
- }
- /// <summary>
- /// 双击列表行
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- conFirmation();
- }
- private void conFirmation()
- {
- if (ultraGrid1.ActiveRow != null)
- {
- SUPP_NAME = ultraGrid1.ActiveRow.Cells["SUPPNAME"].Value.ToString();
- SUPP_CODE = ultraGrid1.ActiveRow.Cells["SUPPCODE"].Value.ToString();
- SUPP_TAX_RATE = ultraGrid1.ActiveRow.Cells["SUPPTAXRATE"].Value.ToString();
- this.Close();
- }
- else
- {
- MessageBox.Show("请选择供应商行信息","提示");
- }
- }
- private void Query()
- {
- Supp EntitySupp = new Supp();
- if (txt_SuppCode.Text.Trim() != "")
- {
- EntitySupp.SuppCode = txt_SuppCode.Text.Trim();
- }
- if (txt_SuppName.Text.Trim() != "")
- {
- EntitySupp.SuppName = txt_SuppName.Text.Trim();
- }
- EntitySupp.Validflag = "1";
- DataTable dt = this.execute<DataTable>("com.hnshituo.pur.configure.service.SuppService", "get_Supp", new object[] { EntitySupp});
- getSupp(dt);
- }
- /// <summary>
- /// 按钮控件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "doQuery": // ButtonTool
- Query();
- break;
- case "doSure": // ButtonTool
- conFirmation();
- break;
- case "doExit": // ButtonTool
- this.Close();
- break;
- }
- }
- private void frmSuppSel_Load(object sender, EventArgs e)
- {
- }
- }
- }
|