Ejemplo n.º 1
0
        private void btnShowFormula_Click(object sender, EventArgs e)
        {
            get_formula_type = "Y";
            frmGoodsPriceFormula frmFormulaFind = new frmGoodsPriceFormula();

            frmFormulaFind.ShowDialog();
            if (get_formula_type != "")
            {
                txtFid.Text = get_formula_type;
                loadFormula(txtFid.Text);
            }
            get_formula_type = "";
            frmFormulaFind.Dispose();
        }
Ejemplo n.º 2
0
        private void getFormulaId(int type)
        {
            get_formula_type = "Y";
            frmGoodsPriceFormula frmFormulaFind = new frmGoodsPriceFormula();

            frmFormulaFind.ShowDialog();
            if ((get_formula_type != "Y"?get_formula_type:"") != "")
            {
                if (type == 0)//如果是在輸入界面(1)獲取公式
                {
                    txtFid.Text = get_formula_type;
                    fillFormula(txtFid.Text);
                }
                else
                if (type == 1)    //如果是在輸入界面(2)獲取公式
                {
                    //txtGetFormula.Text = get_formula_type;

                    txtMo_id_W.Focus();

                    //將選中的制單記錄循環加入到計价表中
                    for (int i = 0; i < dgvWipMo.Rows.Count; i++)
                    {
                        DataGridViewRow crMo = dgvWipMo.Rows[i];
                        if ((bool)crMo.Cells["colSelect_mo"].Value == true)
                        {
                            crMo.Cells["colFid_W"].Value = get_formula_type;
                        }
                    }
                }

                else
                {
                    dgvWipMo.Rows[dgvWipMo.CurrentCell.RowIndex].Cells["colFid_W"].Value = get_formula_type;    //如果是在查詢制單表格中獲取公式
                }
            }
            get_formula_type = "";
            frmFormulaFind.Dispose();
        }