private void btn_change_Click(object sender, EventArgs e)
        {
            bll_contract = new BLL_Contract();
            _dtocontract = new DTO_Contract();
            setAllcontrolToDTO(ref _dtocontract);
            table = bll_contract.GetDataTableViewContract(ref err);
            string num_no = string.Empty;
            bool   stt    = false;

            foreach (DataRow row in table.Rows)
            {
                num_no = (string)row["Notary_Number"];
                stt    = _dtocontract.No_number.Equals(num_no) ? true : false;
            }
            if (stt)
            {
                dialog = MessageBox.Show("Dữ liệu đã tồn tại");
            }
            if (dialog == DialogResult.OK)
            {
                Update_Contract(_dtocontract, bll_contract);
            }
            else
            {
                Add_Contract(_dtocontract, bll_contract);
            }
            this.Close();
            Frm_detail_contract frm_Detail = new Frm_detail_contract();

            frm_Detail.Show();
        }
        private void thaydoi_Click(object sender, EventArgs e)
        {
            Frm_detail_contract frm_Detail = new Frm_detail_contract();

            frm_Detail._dtocontract = dto_contract;
            frm_Detail.Show();
        }
示例#3
0
        private void mn_add_contract_Click(object sender, EventArgs e)
        {
            Frm_detail_contract frm_Detail = new Frm_detail_contract();

            frm_Detail.MdiParent = this;
            frm_Detail.Show();
        }
示例#4
0
        private void mn_add_contract_Click(object sender, EventArgs e)
        {
            foreach (Form frm in MdiChildren)
            {
                frm.Close();
            }
            Frm_detail_contract frm_Detail = new Frm_detail_contract();

            frm_Detail.MdiParent = this;
            frm_Detail.Show();
        }
        private void tol_btn_change_Click(object sender, EventArgs e)
        {
            Frm_detail_contract frm_Detail = new Frm_detail_contract();

            if (dto_contract != null)
            {
                frm_Detail._dtocontract = dto_contract;
                frm_Detail.Show();
            }
            else
            {
                frm_Detail.Show();
            }
        }