public void FillContactPersonByObjectNameReferenceID(string SourceObjectName, long ReferenceID, string TargetObjectName) { try { if (hdnConPersonTargetObject != null) { hdnConPersonTargetObject.Value = TargetObjectName; } CustomProfile profile = CustomProfile.GetProfile(); BrilliantWMS.ServiceContactPersonInfo.iContactPersonInfoClient ServiceContactPerson = new BrilliantWMS.ServiceContactPersonInfo.iContactPersonInfoClient(); List <SP_GetContactPersonListToBindGrid_Result> ContactPersonList = new List <SP_GetContactPersonListToBindGrid_Result>(); if (sessionID == null) { sessionID = Session.SessionID; } ContactPersonList = ServiceContactPerson.GetContactPersonByObjectNameReferenceID(SourceObjectName, ReferenceID, TargetObjectName + "_ContactPerson", sessionID, profile.Personal.UserID.ToString(), profile.DBConnection._constr).ToList(); if (GVContactPerson != null) { GVContactPerson.DataSource = ContactPersonList; GVContactPerson.DataBind(); } ServiceContactPerson.Close(); // btnsave.Visible = false; } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, ParentPage, "UC ContactPerson", "FillContactPersonByObjectNameReferenceID"); } }