Ejemplo n.º 1
0
        private void textBoxContainButton2_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt = (TextBoxContainButton)sender;

            if (LoginInfo._ZT_Admin_Id == "Z")
            {
                _txt.Text = CommomHelper.GetQuery("Role", "");
            }
            else
            {
                string _where = "and UsrRole.Usr_id='" + LoginInfo._Usr_id + "'";
                _txt.Text = CommomHelper.GetQuery("UsrRole", _where);
            }
        }
Ejemplo n.º 2
0
        void btn_Click(object sender, EventArgs e)
        {
            int _ColumnIndex             = dataGridView1.CurrentCell.ColumnIndex;
            int _RowIndex                = dataGridView1.CurrentCell.RowIndex;
            DataGridViewColumn _column   = dataGridView1.Columns[_ColumnIndex];
            BindingSource      _bdSource = new BindingSource();

            _bdSource = dataGridView1.DataSource as BindingSource;
            if (_column.DataPropertyName == "Warehouse_Id")
            {
                string _columns = " ID=Warehouse_Id,Desc_01=Desc_01 ";
                string _id      = "";
                if (LoginInfo._ZT_Admin_Id == "Z")
                {
                    _id = CommomHelper.GetQuery("Warehouse", _columns, "");
                }
                else
                {
                    string _where = "and Warehouse.Company_Id='" + LoginInfo._Usr_Company + "' And (Status_Id In ('130', '130')) And Is_Lowest='T'";
                    _id = CommomHelper.GetQuery("Warehouse", _columns, _where);
                }
                this.dataGridView1.Rows[_RowIndex].Cells[_ColumnIndex].Value = _id;
                _bdSource.EndEdit();
            }
            else if (_column.DataPropertyName == "Item_Id")
            {
                string _columns = " ID=Item_Id,Desc_01=Desc_01 ";
                string _where   = "and Item.Company_Id='" + LoginInfo._Usr_Company + "' And (Status_Id In ('130', '130')) And Is_Lowest='T'";
                string _id      = CommomHelper.GetQuery("Item", _columns, _where);
                this.dataGridView1.Rows[_RowIndex].Cells[_ColumnIndex].Value = _id;
                _bdSource.EndEdit();
            }
            else if (_column.DataPropertyName == "ItemUnit_Id")
            {
                string _columns = " ID=ItemUnit_Id,Desc_01=ItemUnit_Id ";
                // string _where = " And (Status_Id In ('130', '130')) ";
                string _id = CommomHelper.GetQuery("ItemUnit", _columns, "");
                this.dataGridView1.Rows[_RowIndex].Cells[_ColumnIndex].Value = _id;
                _bdSource.EndEdit();
            }

            else if (_column.DataPropertyName == "Project_Id")
            {
                string _columns = " ID=Project_Id,Desc_01=Desc_01 ";
                string _where   = "and Company_Id='" + LoginInfo._Usr_Company + "' And (Status_Id In ('130', '130')) ";
                string _id      = CommomHelper.GetQuery("Project", _columns, _where);
                this.dataGridView1.Rows[_RowIndex].Cells[_ColumnIndex].Value = _id;
                _bdSource.EndEdit();
            }
            else if (_column.DataPropertyName == "PackageMethod_Id")
            {
                string _where   = "and (Status_Id In (''130'', ''130'')) ";
                string _columns = " ID=PackageMethod_Id,Desc_01=Desc_01 ";
                string _id      = CommomHelper.GetQuery("PackageMethod", _columns, _where);
                this.dataGridView1.Rows[_RowIndex].Cells[_ColumnIndex].Value = _id;
                _bdSource.EndEdit();
            }
            else if (_column.DataPropertyName == "Ewm_Id")     //序列号和二维码
            {
                if (!string.IsNullOrEmpty(this.CsvPo_Id.Text) && !string.IsNullOrEmpty(this.dataGridView1.Rows[_RowIndex].Cells["ItemPrpty_Id"].Value.ToString()))
                {
                    ShippingInfoEwmManage _EwmManage = new ShippingInfoEwmManage();
                    _EwmManage.Edit           = _Edit;
                    _EwmManage.Shipping_Id    = this.Shipping_Id.Text;
                    _EwmManage.Company_Id     = LoginInfo._Usr_Company;
                    _EwmManage.CsvPo_Id       = this.CsvPo_Id.Text;
                    _EwmManage.ItemPrpty_Id   = this.dataGridView1.Rows[_RowIndex].Cells["ItemPrpty_Id"].Value.ToString();
                    _EwmManage.qty            = this.dataGridView1.Rows[_RowIndex].Cells["Qty"].Value.ToString();
                    _EwmManage.itemUt         = String.IsNullOrEmpty(this.dataGridView1.Rows[_RowIndex].Cells["ItemUnit_Id"].Value.ToString()) ? "" : this.dataGridView1.Rows[_RowIndex].Cells["ItemUnit_Id"].Value.ToString();
                    _EwmManage.Body1_Tbl_Name = Body1_Tbl_Name;
                    if (_EwmManage.ShowDialog() != DialogResult.OK)
                    {
                    }
                }
                else
                {
                    MessageBox.Show("客户PO和型号必须输入!");
                }
            }
            else if (_column.DataPropertyName == "snc")     //SNC导入导出
            {
                if (string.IsNullOrEmpty(this.CsvPo_Id.Text) || string.IsNullOrEmpty(this.dataGridView1.Rows[_RowIndex].Cells["ItemPrpty_Id"].Value.ToString()) || string.IsNullOrEmpty(this.dataGridView1.Rows[_RowIndex].Cells["Qty"].Value.ToString()))
                {
                    MessageBox.Show("客户PO和型号、数量必须输入!");
                    return;
                }
                Form3 f3 = new Form3();
                f3.PO    = this.CsvPo_Id.Text;
                f3.SEL   = this.dataGridView1.Rows[_RowIndex].Cells["ItemPrpty_Id"].Value.ToString();
                f3.QTY   = this.dataGridView1.Rows[_RowIndex].Cells["Qty"].Value.ToString();
                f3.input = this.dataGridView1.Rows[_RowIndex].Cells["Src_Input_Id"].Value.ToString();
                if (f3.ShowDialog() != DialogResult.OK)
                {
                }
            }
        }
Ejemplo n.º 3
0
        private void textBoxContainButton1_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt = (TextBoxContainButton)sender;

            _txt.Text = CommomHelper.GetQuery("Usr1", "");
        }