Пример #1
0
        public DataTable ListMerchantInfo()
        {
            SqlConnection objConn = DBHelpers.ConnectDb(ref errMsg);
            string        strSQL  = "";

            strSQL = "\r\n Select MerchantID, MerchantCode,MerchantName " +
                     "\r\n From merchant_profile " +
                     "\r\n Where Deleted=0 " +
                     "\r\n Order by MerchantName ASC ;";
            DataTable dt = DBHelpers.List(strSQL, objConn);

            objConn.Close();
            return(dt);
        }
Пример #2
0
        public DataTable TicketInfo()
        {
            SqlConnection objConn = DBHelpers.ConnectDb(ref errMsg);
            string        strSQL  = "";

            strSQL = "\r\n Select t.*,m.MerchantName,b.BrandName,c.ProductLevelName From  ticket_info t " +
                     "\r\n left join merchant_profile m on t.MerchantID = m.MerchantID " +
                     "\r\n left join brand_profile b on t.BrandID = b.BrandID " +
                     "\r\n left join productlevel c on t.ShopID = c.ProductLevelID " +
                     "\r\n Order By t.TicketID DESC ";

            DataTable dt = DBHelpers.List(strSQL, objConn);

            objConn.Close();
            return(dt);
        }
Пример #3
0
        public DataTable ListShopInfo(int id)
        { //id=BrandID
            SqlConnection objConn = DBHelpers.ConnectDb(ref errMsg);
            string        strSQL  = "";

            strSQL = "\r\n Select MerchantID,BrandID,ProductLevelID,ProductLevelCode,ProductLevelName From productlevel " +
                     "\r\n where Deleted=0";
            if (id > 0)
            {
                strSQL += " and BrandID=" + id;
            }

            strSQL += "\r\n  Order by ProductLevelName ASC ";
            DataTable dt = DBHelpers.List(strSQL, objConn);

            objConn.Close();
            return(dt);
        }
Пример #4
0
        public DataTable ListBrandInfo(int id)
        { //id=MerchantID
            SqlConnection objConn = DBHelpers.ConnectDb(ref errMsg);
            string        strSQL  = "";

            strSQL = "\r\n Select BrandID, MerchantID, BrandName ,BrandCode " +
                     "\r\n From brand_profile " +
                     "\r\n Where Deleted = 0 ";
            if (id > 0)
            {
                strSQL += "and MerchantID =" + id;
            }
            strSQL += "\r\n Order by BrandName ASC ";
            DataTable dt = DBHelpers.List(strSQL, objConn);

            objConn.Close();
            return(dt);
        }