コード例 #1
0
 public async Task <IEnumerable <Level2> > GetSubcategoryForSideMenu(int CategoryId)
 {
     try
     {
         RepoBase <Level2> repo = new RepoBase <Level2>("Level1");
         return(await repo.FindExistanceMulti("Level1Id", CategoryId.ToString()));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
 public async Task <IEnumerable <SpecProductDetails> > GetAllSpecProductDetails(int ProductId)
 {
     try
     {
         var repo = new RepoBase <SpecProductDetails>("SpecProductDetails");
         return(await repo.FindExistanceMulti("SpecMasterId", ProductId.ToString()));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
 public async Task <IEnumerable <SpecDetail> > GetAllSpecDetailsForMAster(int MasterId)
 {
     try
     {
         var repo = new RepoBase <SpecDetail>("SpecItems");
         return(await repo.FindExistanceMulti("SpecMasterId", MasterId.ToString()));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
        public async Task <HttpResponseMessage> GetAllSubCategor2s(int CatId, int SubCatId)
        {
            RepoBase <Level3> specmaster;

            try
            {
                specmaster = new RepoBase <Level3>("Level2");
                string clientAddress = HttpContext.Current.Request.UserHostAddress;
                var    SQL           = "SELECT * FROM  Level3 WHERE Level1Id = " + CatId + " AND Level12d = " + SubCatId + " ORDER BY Level3Name";
                return(Request.CreateResponse <IEnumerable <Level3> >(HttpStatusCode.OK, await specmaster.FindExistanceMulti(SQL)));
            }
            catch (Exception ex)
            {
                specmaster = null;
                LogHelper.WriteLog(HttpContext.Current.Request, ex, RequestContext.Principal.Identity.Name);
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
            }
        }
コード例 #5
0
        public async Task <HttpResponseMessage> GetAllSubCategories(int CatId)
        {
            RepoBase <Level2> specmaster;

            try
            {
                specmaster = new RepoBase <Level2>("Level2");
                string clientAddress = HttpContext.Current.Request.UserHostAddress;
                return(Request.CreateResponse <IEnumerable <Level2> >(HttpStatusCode.OK, await specmaster.FindExistanceMulti("Level1Id", CatId.ToString())));
            }
            catch (Exception ex)
            {
                specmaster = null;
                LogHelper.WriteLog(HttpContext.Current.Request, ex, RequestContext.Principal.Identity.Name);
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
            }
        }