Exemple #1
0
        public UserControlOrder()
        {
            InitializeComponent();

            SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();
            comboBox1.DataSource    = _bll.GetDataTableOfOrder();
            comboBox1.DisplayMember = "IBB001";
        }
Exemple #2
0
        public UserControlBatch()
        {
            InitializeComponent();

            SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();
            comboBox1.DataSource    = _bll.GetDataTableLotId();
            comboBox1.DisplayMember = "BAR007";
        }
Exemple #3
0
 private void Form2_Closing(object sender, CancelEventArgs e)
 {
     if (tableQuery != null && tableQuery.Rows.Count > 0)
     {
         SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();
         _bll.signOfLi(tableQuery);
     }
 }
Exemple #4
0
 /// <summary>
 /// 删除所有内容
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnCAll_Click(object sender, EventArgs e)
 {
     if (tableQuery != null && tableQuery.Rows.Count > 0)
     {
         SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();
         _bll.signOfLi(tableQuery);
     }
     this.dataGrid1.DataSource = null;
     tableQuery = null;
 }
Exemple #5
0
        public FormStorageType(string Choise)
        {
            InitializeComponent();

            this.storageChoise = Choise;
            SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();
            comboBox1.DataSource    = _bll.GetDataTableLaa(storageChoise);
            comboBox1.DisplayMember = "LAA002";
            comboBox1.ValueMember   = "LAA001";
            comboBox2.DataSource    = _bll.GetDataTabledba();
            comboBox2.DisplayMember = "DBA002";
            comboBox2.ValueMember   = "DBA001";
        }
Exemple #6
0
 /// <summary>
 /// 删除选中单据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnClear_Click(object sender, EventArgs e)
 {
     if (tableQuery != null && tableQuery.Rows.Count > 0)
     {
         int id = this.BindingContext[this.dataGrid1.DataSource].Position;
         if (id >= 0)
         {
             SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();
             string lotId = tableQuery.Rows[id]["BAR008"].ToString();
             _bll.signOfLiF(lotId);
             tableQuery.Rows.RemoveAt(id);
             this.dataGrid1.DataSource = tableQuery;
         }
     }
 }
Exemple #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            FormReportQuery query = new FormReportQuery();

            query.PassDataBetweenForm += new FormReportQuery.PassDataBetweenFormHandler(query_PassDataBetweenForm);
            DialogResult result = query.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                if (!string.IsNullOrEmpty(strWhere))
                {
                    SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();
                    DataTable tableQuery = _bll.GetDataTableOfAll(strWhere);
                    dataGrid1.DataSource = tableQuery;
                }
            }
        }
Exemple #8
0
        public Form3(string choiseCk)
        {
            InitializeComponent();

            _bll = new SmartDeviceProjectBll.Bll.ConnecBll();

            this.textBox3.Focus();

            //comboBox1.DataSource = _bll.GetDataTableLotId();
            //comboBox1.DisplayMember = "BAR007";
            //comboBox1.SelectedIndex = -1;

            comboBox2.DataSource    = _bll.GetDataTableOfOrder();
            comboBox2.DisplayMember = "IBB001";
            comboBox2.SelectedIndex = -1;

            this.choiseCk = choiseCk;
        }
Exemple #9
0
 /// <summary>
 /// 出库
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnStorage_Click(object sender, EventArgs e)
 {
     if (tableQuery != null && tableQuery.Rows.Count > 0)
     {
         FormStorageType form   = new FormStorageType(storageChois);
         DialogResult    result = form.ShowDialog();
         if (result == System.Windows.Forms.DialogResult.OK)
         {
             string storageType   = Values.valueOne;
             string storagePerson = Values.valueTwo;
             SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();
             if (tableQuery.Rows.Count > 0)
             {
                 if (storageChois == "2")
                 {
                     storageType = "13";
                     storageType = "14";
                 }
                 //if (SmartDeviceProjectBll.SeverState.CheckServeStatus() == false)
                 //    return;
                 bool resul = _bll.signOfStorage(tableQuery, storageType, storagePerson);
                 if (resul == true)
                 {
                     MessageBox.Show("成功出库");
                     this.dataGrid1.DataSource = null;
                     tableQuery  = null;
                     signOfBatch = "";
                     userControlButton1.labSum.Text = "合计:0条记录";
                 }
                 else
                 {
                     MessageBox.Show("出库失败,请重试");
                 }
             }
         }
     }
 }
Exemple #10
0
        //添加
        private void btnAdd_Click_1(object sender, EventArgs e)
        {
            Form3 from = new Form3(storageChois);

            if (from.ShowDialog() == DialogResult.OK)
            {
                SmartDeviceProjectBll.Bll.ConnecBll _bll = new SmartDeviceProjectBll.Bll.ConnecBll();

                string lotId    = from.getLotId;
                string orderNum = from.getOrderNum;
                string ckNum    = from.getNum;
                if (tableQuery == null || tableQuery.Rows.Count < 1)
                {
                    tableQuery = _bll.GetDataTableOfLot(lotId);
                    if (tableQuery.Rows.Count > 0)
                    {
                        tableQuery.Columns.Add("IBB001", typeof(System.String));
                        tableQuery.Rows[0][5] = orderNum;
                        tableQuery.Rows[0][4] = ckNum;
                    }
                }
                else
                {
                    DataTable da = new DataTable();
                    da = _bll.GetDataTableOfLot(lotId);
                    if (da != null && da.Rows.Count > 0)
                    {
                        tableQuery.Rows.Add(da.Rows[0]["BAR001"].ToString(), da.Rows[0]["BAR004"].ToString(), da.Rows[0]["BAR008"].ToString(), da.Rows[0]["BAR007"].ToString(), ckNum, orderNum);
                    }
                }

                dataGrid1.DataSource = tableQuery;
                this.userControlButton1.labSum.Text = "合计:" + tableQuery.Rows.Count + " 条记录";
                _bll.signOfLi(lotId);
            }
        }