private void btnsave_Click(object sender, EventArgs e) { try { if (txt_create_partner.Text == "") { throw new Exception("You must enter a Partner Name."); } else { Record[] partners = Cache.OpenERPOutlookPlugin.SearchPartnerByName(txt_create_partner.Text); if (partners != null && partners.Length > 0) { throw new Exception("Partner already exist."); } else { frm_select_partner sel_partner = (frm_select_partner)this.parent_form; sel_partner.SelectPartnerText = txt_create_partner.Text; sel_partner.search_lst_partner(); this.Close(); } } } catch (Exception ex) { Connect.handleException(ex); } }
private void btnLink_partner_Click(object sender, EventArgs e) { frm_select_partner select_partner = new frm_select_partner(); select_partner.parent_form = this; select_partner.Show(); this.Close(); }