protected string GetSchemeName(string alertType, int SchemeID) { string schemeName; DataSet dsmetatableDetails; DataSet dsSchemeName; string tableName; string description; if (alertType == "Property") { metatablePrimaryKey = "CPNP_PropertyNPId"; } else if (alertType == "SIP" || alertType == "SWP" || alertType == "STP") { metatablePrimaryKey = "PASP_SchemePlanCode"; } else if (alertType == "Personal") { metatablePrimaryKey = "CPNP_PersonalNPId"; } dsmetatableDetails = alertsBo.GetMetatableDetails(metatablePrimaryKey); tableName = dsmetatableDetails.Tables[0].Rows[0][2].ToString(); description = dsmetatableDetails.Tables[0].Rows[0][1].ToString(); dsSchemeName = alertsBo.GetSchemeDescription(description, tableName, metatablePrimaryKey, SchemeID); schemeName = dsSchemeName.Tables[0].Rows[0][0].ToString(); return(schemeName); }
protected string GetSchemeName(string AllFieldNames, int SchemeID) { string schemeName; string[] allFieldsArray; string metatablePrimaryKey; DataSet dsmetatableDetails; DataSet dsSchemeName; string tableName; string description; try { allFieldsArray = AllFieldNames.Split(','); metatablePrimaryKey = allFieldsArray[1].Split('.')[1]; dsmetatableDetails = alertsBo.GetMetatableDetails(metatablePrimaryKey); tableName = dsmetatableDetails.Tables[0].Rows[0][2].ToString(); description = dsmetatableDetails.Tables[0].Rows[0][1].ToString(); dsSchemeName = alertsBo.GetSchemeDescription(description, tableName, metatablePrimaryKey, SchemeID); schemeName = dsSchemeName.Tables[0].Rows[0][0].ToString(); } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "CustomerTransactionalAlertManagement.ascx:GetSchemeName()"); object[] objects = new object[0]; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(schemeName); }
protected string GetSchemeName(string alertType, int SchemeID) { string schemeName = ""; DataSet dsmetatableDetails = null; DataSet dsSchemeName = null; string tableName = ""; string description = ""; try { if (alertType == "Property") { metatablePrimaryKey = "CPNP_PropertyNPId"; } else if (alertType == "SIP" || alertType == "SWP" || alertType == "STP") { metatablePrimaryKey = "PASP_SchemePlanCode"; } else if (alertType == "Personal") { metatablePrimaryKey = "CPNP_PersonalNPId"; } dsmetatableDetails = alertsBo.GetMetatableDetails(metatablePrimaryKey); tableName = dsmetatableDetails.Tables[0].Rows[0][2].ToString(); description = dsmetatableDetails.Tables[0].Rows[0][1].ToString(); dsSchemeName = alertsBo.GetSchemeDescription(description, tableName, metatablePrimaryKey, SchemeID); if (dsSchemeName.Tables[0].Rows.Count > 0) { schemeName = dsSchemeName.Tables[0].Rows[0][0].ToString(); } else { schemeName = "N/A"; } } catch (BaseApplicationException Ex) { throw Ex; } catch (Exception Ex) { BaseApplicationException exBase = new BaseApplicationException(Ex.Message, Ex); NameValueCollection FunctionInfo = new NameValueCollection(); FunctionInfo.Add("Method", "AdvisorRMCustIndiDashboard.ascx:GetSchemeName()"); object[] objects = new object[9]; objects[0] = customerId; objects[1] = dsCustomerAlerts; objects[2] = alertType; objects[3] = SchemeID; objects[4] = dsmetatableDetails; objects[5] = dsSchemeName; objects[6] = tableName; objects[7] = description; objects[8] = schemeName; FunctionInfo = exBase.AddObject(FunctionInfo, objects); exBase.AdditionalInformation = FunctionInfo; ExceptionManager.Publish(exBase); throw exBase; } return(schemeName); }