using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MeterModuleLibrary
{
    public partial class frmScaleQuery_bak : Form
    {
        public frmScaleQuery_bak()
        {
            InitializeComponent();
        }

        private void frmScaleQuery_Load(object sender, EventArgs e)
        {
            //物料信息  METER_BASE_MATTER_INFO
            DataTable dtMat = new DataTable();//doQueryBaseInfo("1001");
            if (dtMat == null || dtMat.Rows.Count == 0)
            {
                return;
            }
            cmbMATTER_NO.DataSource = dtMat;
            cmbMATTER_NO.ValueMember = "MATTER_NO";
            cmbMATTER_NO.DisplayMember = "MATTER_NAME";
            cmbMATTER_NO.SelectedIndex = -1;

            //收货单位
            DataTable dtFORWARDING = new DataTable();//doQueryBaseInfo("1001");
            if (dtFORWARDING == null || dtFORWARDING.Rows.Count == 0)
            {
                return;
            }
            cmbFORWARDING_UNIT_NO.DataSource = dtFORWARDING;
            cmbFORWARDING_UNIT_NO.ValueMember = "FORWARDING_UNIT_NO";
            cmbFORWARDING_UNIT_NO.DisplayMember = "FORWARDING_UNIT_NAME";
            cmbFORWARDING_UNIT_NO.SelectedIndex = -1;

            //发货单位
            DataTable dtRECEIVING = new DataTable();//doQueryBaseInfo("1001");
            if (dtRECEIVING == null || dtRECEIVING.Rows.Count == 0)
            {
                return;
            }
            cmbRECEIVING_UINT_NO.DataSource = dtRECEIVING;
            cmbRECEIVING_UINT_NO.ValueMember = "RECEIVING_UINT_NO";
            cmbRECEIVING_UINT_NO.DisplayMember = "RECEIVING_UINT_NAME";
            cmbRECEIVING_UINT_NO.SelectedIndex = -1;
        }

        public string strValue = "";
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            string strMatNo = this.cmbMATTER_NO.SelectedValue != null ? this.cmbMATTER_NO.SelectedValue.ToString() : "";
            string strFORWARDING = this.cmbFORWARDING_UNIT_NO.SelectedValue != null ? this.cmbFORWARDING_UNIT_NO.SelectedValue.ToString() : "";
            string strRECEIVING = this.cmbRECEIVING_UINT_NO.SelectedValue != null ? this.cmbRECEIVING_UINT_NO.SelectedValue.ToString() : "";



            //查询出数据，然后传递给界面
            strValue = "";
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void txtMETER_TYPE_NO_Enter(object sender, EventArgs e)
        {

        }
    }
}
