Exemplo n.º 1
0
        private void BtnUpdateCost_Click(object sender, EventArgs e)
        {
            if (DgvCostApply.SelectedRows.Count != 1)
            {
                MessageBox.Show("请仅选择一个费用单进行修改!", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            int         costId   = (int)DgvCostApply.SelectedRows[0].Cells["cost_id"].Value;
            List <cost> costList = new CostApplyBLL().Query(new Dictionary <string, object> {
                { "id", costId }
            });

            if (costList.Count != 0)
            {
                if (costList[0].Main.status != 0)
                {
                    MessageBox.Show("该费用单已审核,不可修改", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
            }
            CostApplyForm costApplyForm = new CostApplyForm(costId);

            costApplyForm.Text = "费用单修改";
            costApplyForm.ShowDialog();
            BtnSearchCostApply_Click(null, null);
        }
Exemplo n.º 2
0
        //</张乐_3>
        #endregion

        #region 陈波
        //<陈波_3>
        //
        private void BtnAddCost_Click(object sender, EventArgs e)
        {
            CostApplyForm costApplyForm = new CostApplyForm();

            costApplyForm.ShowDialog();
            BtnSearchCostApply_Click(null, null);
        }