Exemple #1
0
        public List <CPStorefront> getClient(int cPCId)
        {
            SqlCommand dinsert = new SqlCommand("usp_GetCPClientForStoreFront");

            dinsert.Parameters.AddWithValue("@CPId", SqlDbType.Int).Value = cPCId;

            DataSet             dtList = objcon.GetDsByCommand(dinsert);
            List <CPStorefront> list1  = new List <CPStorefront>();

            foreach (DataRow dr in dtList.Tables[0].Rows)
            {
                CPStorefront pd = new CPStorefront();


                pd.BannerImage = dr["ClientImage"].ToString();


                list1.Add(pd);
            }
            return(list1);
        }
Exemple #2
0
        public List <CPStorefront> getCompanyLogo(string cPName)
        {
            SqlCommand dinsert = new SqlCommand("usp_GetCompanyLogo");

            if (!string.IsNullOrWhiteSpace(cPName))
            {
                dinsert.Parameters.AddWithValue("@CPName", SqlDbType.VarChar).Value = cPName;
            }
            DataSet             dtList = objcon.GetDsByCommand(dinsert);
            List <CPStorefront> list   = new List <CPStorefront>();

            foreach (DataRow dr in dtList.Tables[0].Rows)
            {
                CPStorefront list1 = new CPStorefront();
                list1.CustName    = Convert.ToString(dr["CustName"]);
                list1.CPBannerId  = Convert.ToInt32(dr["CPCompanyLogoId"]);
                list1.CPId        = Convert.ToInt32(dr["CPId"].ToString());
                list1.BannerImage = dr["CPCompanyLogo"].ToString();
                list.Add(list1);
            }
            return(list);
        }