/// <summary> /// Populate contact methods based on Contact Id /// </summary> /// <param name="bShowFooter"></param> private void PopulateContactMethodsGrid() { //ContactMethod biz = new ContactMethod(); //biz.GetByParent(contactId); //ContactMethodGridView.DataSource = biz.DataSourceView; ContactMethodGridView.DataSource = BusinessObject.GetByParentAsDataView <ContactMethod>(contactId); ContactMethodGridView.DataBind(); }
protected void SaveClick(object sender, CommandEventArgs e) { Contact contacts = new Contact(); bool isNew = true; if (contactId != -1) { isNew = false; contacts.Get(contactId); } CICHelper.SetBOValues(EditPanel.Controls, contacts, 0); int nOrgContactId = contactId; contacts.Save(); // Get the new contactId from the DB contactId = Int32.Parse(contacts[Contact.ContactId].ToString()); ContactIdField.Value = contacts[Contact.ContactId].ToString(); // Save ProjectOrg ProjContacts // ProjectOrg_ProjectCon needs 2 keys, orgid and contact id // However, orgid will be extracted from dropdown value System.Collections.Generic.Dictionary <string, int> keyList = new System.Collections.Generic.Dictionary <string, int>(); keyList.Add("ContactId", contactId); OrgGrid2.Save(keyList); ContactMethodGridView.Save(contactId); // update contact documents ContactDocumentsGrid.Save(contactId); PopulateGrids(); LoadOrganizationsList(); PopulateContactMethodsGrid(); RefreshMainList(false); SetContentVisibility(); // Check if the new contact needs to be assigned to the current project AddContactToProject(nOrgContactId); }
protected void SaveNewContact() { ContactMethodGridView.SaveFooterRecord(contactId); PopulateContactMethodsGrid(); }