public void Client_Contract_Button_Click(object sender, EventArgs e) { String id = _client.GetContract(); if ((id == null) || id == "") { NewContract(); _contractForm = new AddEditContractForm(this, false, userID, _contract.FindID()); _contractForm.ClientLinked(_clientForm.GetName()); _contract.SetClient(_client.FindID()); _contractForm.ShowDialog(); if (MClientContract.GetDT(_contract.FindID(), "Client_Contract", "client_contract_id").Rows.Count > 0) { MClient.SetContract(_client.FindID(), _contract.FindID()); _client.changeContract(_contract.FindID()); // _clientForm.SetContractButton(MClientContract.GetName(_contract.FindID())); } } else { OldContract(id); _contractForm = new AddEditContractForm(this, false, userID, id); _contractForm.ClientLinked(_clientForm.GetName()); _contractForm.SetFields(_contract.Get(), userID); Populate_AddrGridView(id); _contractForm.Activate(); _contractForm.ShowDialog(); } }
public void Edit_contract_Button_Click(View sender, int id, Panel pnl) { _mainForm = sender; userID = id; _contractForm = new AddEditContractForm(this, true, userID, "0"); _contractForm.TopLevel = false; _contractForm.FormBorderStyle = FormBorderStyle.None; pnl.Controls.Add(_contractForm); _contractForm.Show(); }
public void Add_contract_Button_Click(View sender, int id, Panel pnl) { _mainForm = sender; userID = id; NewContract(); _contractForm = new AddEditContractForm(this, false, userID, _contract.FindID()); _contractForm.Activate(); _contractForm.TopLevel = false; _contractForm.FormBorderStyle = FormBorderStyle.None; pnl.Controls.Add(_contractForm); _contractForm.Show(); }
public void Client_Contract_Button_Click(object sender, EventArgs e) { String id = _client.GetContract(); if ((id == null)|| id == "") { NewContract(); _contractForm = new AddEditContractForm(this, false, userID, _contract.FindID()); _contractForm.ClientLinked(_clientForm.GetName()); _contract.SetClient(_client.FindID()); _contractForm.ShowDialog(); if (MClientContract.GetDT(_contract.FindID(), "Client_Contract", "client_contract_id").Rows.Count > 0) { MClient.SetContract(_client.FindID(), _contract.FindID()); _client.changeContract(_contract.FindID()); // _clientForm.SetContractButton(MClientContract.GetName(_contract.FindID())); } } else { OldContract(id); _contractForm = new AddEditContractForm(this, false, userID, id); _contractForm.ClientLinked(_clientForm.GetName()); _contractForm.SetFields(_contract.Get(),userID); Populate_AddrGridView(id); _contractForm.Activate(); _contractForm.ShowDialog(); } }