示例#1
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="Seq"></param>
        /// <param name="pokeid"></param>

        public void DateBind(decimal Seq, string pokeid = null)
        {
            //HunheClass HunHeNowCigarette = new HunHeService_new();
            List <HunheNowViewInfos> hunhelist = new List <HunheNowViewInfos>();

            hunhelist = HunheClass.GetALLCigarette(1, 1);
            if (hunhelist.Count < 1)
            {
                labMachineSeq.Text = Seq + "通道没有分拣数据,请选择其他通道!";
            }
            //DgvNowView.DataSource = null;
            DgvNowView.DataSource = hunhelist;
        }
示例#2
0
        private void BtnSearch_Click(object sender, EventArgs e)
        {
            List <HunheInfo> list = new List <HunheInfo>();

            task_data.DataSource = list;
            if (cmbTroughnum.SelectedIndex == 0)
            {
                list = HunheClass.GetHunheData(0);
            }
            else
            {
                list = HunheClass.GetHunheData(Convert.ToDecimal(cmbTroughnum.SelectedItem));
            }
            task_data.DataSource = list;
        }
示例#3
0
        public w_HunheReport()
        {
            InitializeComponent();
            List <string> list = new List <string>();

            list = HunheClass.GetHunheThrough();
            //for (int i = 0; i < list.Count; i++)
            //{
            //    if (list[i] == "1")
            //        list[i] = "特异形烟" + list[i] + "道";
            //    else
            //        list[i] = "混合" + list[i] + "道";
            //}
            list.Insert(0, "所有");
            cmbTroughnum.DataSource    = list;
            cmbTroughnum.SelectedIndex = 0;
        }
示例#4
0
        private void btn_search_Click(object sender, EventArgs e)
        {
            try
            {
                switch (comboBox1.Text)
                {
                case "卷烟名称":
                    DgvNowView.DataSource = HunheClass.GetSearchCigarette(txt_search.Text, 1);
                    break;

                case "商户名称":
                    DgvNowView.DataSource = HunheClass.GetSearchCigarette(txt_search.Text, 2);
                    break;
                }
            }
            catch (Exception)
            {
                label1.Visible = true;
                label1.Text    = "数据库连接失败!请检查连接后重新打开程序!";
            }
        }