Пример #1
0
        protected void getModelGroupInfo(clsPortfolio Portfolio, string strModelGroupID, string strModelPortfolioID, int intIFA_ID)
        {
            
            SqlCommand cmd = new SqlCommand();
            SqlDataReader dr;

            con.Open();
            cmd.Connection = con;
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "SWITCH_ModelGroupGet";

            cmd.Parameters.Add("@param_ModelGroupID", System.Data.SqlDbType.NVarChar).Value = strModelGroupID;
            cmd.Parameters.Add("@param_IFA_ID", System.Data.SqlDbType.Int).Value = intIFA_ID;

            dr = cmd.ExecuteReader();

            while(dr.Read())
            {
                this.strModelGroupID = dr["ClientID"].ToString();
                this.strModelGroupName = dr["Forenames"].ToString();
                this.intIFA_ID = int.Parse(dr["ClientNumber"].ToString());
                this.intModelGroupCode = int.Parse(dr["IFA_ID"].ToString());
                this._clsModelPortfolio = new clsModelPortfolio(Portfolio, strModelGroupID, strModelPortfolioID);
            }
            dr.Dispose();
            cmd.Connection.Close();
            cmd.Dispose();
            con.Close();
            //con.Dispose();
        }
Пример #2
0
        protected void getModelGroupInfo(clsPortfolio Portfolio, string strModelGroupID, string strModelPortfolioID, int intIFA_ID)
        {
            SqlCommand    cmd = new SqlCommand();
            SqlDataReader dr;

            con.Open();
            cmd.Connection  = con;
            cmd.CommandType = System.Data.CommandType.StoredProcedure;
            cmd.CommandText = "SWITCH_ModelGroupGet";

            cmd.Parameters.Add("@param_ModelGroupID", System.Data.SqlDbType.NVarChar).Value = strModelGroupID;
            cmd.Parameters.Add("@param_IFA_ID", System.Data.SqlDbType.Int).Value            = intIFA_ID;

            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                this.strModelGroupID    = dr["ClientID"].ToString();
                this.strModelGroupName  = dr["Forenames"].ToString();
                this.intIFA_ID          = int.Parse(dr["ClientNumber"].ToString());
                this.intModelGroupCode  = int.Parse(dr["IFA_ID"].ToString());
                this._clsModelPortfolio = new clsModelPortfolio(Portfolio, strModelGroupID, strModelPortfolioID);
            }
            dr.Dispose();
            cmd.Connection.Close();
            cmd.Dispose();
            con.Close();
            //con.Dispose();
        }