public IHttpActionResult GetHumTumOffer(string version) { try { System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; string x_StateName = string.Empty; string x_DistrictName = string.Empty; if (headers.Contains("state")) { x_StateName = headers.GetValues("state").First().ToLower(); } if (headers.Contains("district")) { x_DistrictName = headers.GetValues("district").First().ToLower(); } DataSet ds = new DataSet(); ds = LiveStocks.GetHumTumOffer(version, x_StateName, x_DistrictName); //ds.Tables[0].TableName = "TrendsProducts";Product,ProductsApiReponse ds.Tables[0].TableName = "Product"; //return Ok(new { TrendsProductsApiReponse = ds, Status = true }); return(Ok(new { ProductsApiReponse = ds, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { ProductsApiReponse = "", Status = false })); } }
public IHttpActionResult GetKGPCategorySubCategoryWiseDataV2(KitchenGardenEntity objkgpList) { try { System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; string x_StateName = string.Empty; string x_DistrictName = string.Empty; if (headers.Contains("state")) { x_StateName = headers.GetValues("state").First().ToLower(); } if (headers.Contains("district")) { x_DistrictName = headers.GetValues("district").First().ToLower(); } ReasonStatusBal _rsbal = new ReasonStatusBal(); // DataSet ds1 = new DataSet(); var ds1 = _rsbal.GetKGPCategorySubCategoryWiseData(objkgpList, x_StateName, x_DistrictName); ds1.Tables[0].TableName = "Product"; ds1.Tables[1].TableName = "Count"; return(Ok(new { ProductsApiReponse = ds1, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { ProductsApiReponse = "", Status = false })); } }
public IHttpActionResult GetBzAppActiveBrands(string version) { try { System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; string x_StateName = string.Empty; string x_DistrictName = string.Empty; if (headers.Contains("state")) { x_StateName = headers.GetValues("state").First().ToLower(); } if (headers.Contains("district")) { x_DistrictName = headers.GetValues("district").First().ToLower(); } DataSet ds = new DataSet(); ds = BzCatagory.ActiveBrands(version, x_StateName, x_DistrictName); ds.Tables[0].TableName = "BZActiveBrands"; return(Ok(new { BZBrands = ds, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZBrands = "", Status = false })); } }
public IHttpActionResult AddToCartItems(BzCartItems obj) { BzWebsite _objBal = new BzWebsite(); AddtoCartResult objAddToCart = new AddtoCartResult(); int flag = 0; Dictionary <string, int> returndata = new Dictionary <string, int>(); returndata.Add("status", 0); try { //System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; //string x_StateName = string.Empty; //string x_DistrictName = string.Empty; //if (headers.Contains("state")) //{ // x_StateName = headers.GetValues("state").First().ToLower(); //} //if (headers.Contains("district")) //{ // x_DistrictName = headers.GetValues("district").First().ToLower(); //} objAddToCart = _objBal.AddToCart(obj); return(Ok(new { Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, objAddToCart.Status); return(Ok(new { Status = false })); } }
public IHttpActionResult GetCartItems(string version, string UserId) { try { System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; string x_StateName = string.Empty; string x_DistrictName = string.Empty; if (headers.Contains("state")) { x_StateName = headers.GetValues("state").First().ToLower(); } if (headers.Contains("district")) { x_DistrictName = headers.GetValues("district").First().ToLower(); } DataSet ds = new DataSet(); ds = BzWebsite.GetCartItems(version, x_StateName, x_DistrictName, UserId); ds.Tables[0].TableName = "Items"; return(Ok(new { CartApiReponse = ds, ItemCount = ds.Tables[1].Rows[0]["ItemCount"].ToString(), Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { CartApiReponse = "", Status = false })); } }
public IHttpActionResult DelightPushOrderDetail(DLight objDlight) { DlightPostResponse objResponse = new DlightPostResponse(); try { int value = 0; value = ClsDelight.DelightPushOrderDetail(objDlight); if (value > 0) { objResponse.Success = true; objResponse.Msg = "Submitted Successfully"; } else { objResponse.Success = false; objResponse.Msg = "Failed, Try Again!"; } return(Ok(new { BZApiReponse = objResponse, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); objResponse.Msg = "Failed."; } return(Ok(new { BZApiReponse = objResponse, Status = false })); }
public IHttpActionResult GetBrandWiseProduct(string version, int?CategoryId, int BrandId, int DistrictId, int PageIndex, int PageSize) { try { DataSet ds = new DataSet(); DataSet ds1 = new DataSet(); ds = LiveStocks.GetCategoryWiseProduct(version, CategoryId, null, DistrictId, BrandId, PageIndex, PageSize); ds.Tables[0].TableName = "Product"; ds.Tables[1].TableName = "BrandCategory"; ds1.Tables.Add(ds.Tables["Product"].Copy()); var productData = ds.Tables[0].AsEnumerable(); var distinctData = productData.Select(x => x.Field <string>("ProductHindiName")).Distinct(); if (ds.Tables[0].Rows.Count > 0) { return(Ok(new { ProductsApiReponse = ds1, Status = true })); } else { return(Ok(new { ProductsApiReponse = "", Status = false })); } } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { ProductsApiReponse = "", Status = false })); } }
public CreatedOrderResult OrderCreateV2(OrderCreateModel obj) { ReasonStatusBal _rsbal = new ReasonStatusBal(); CreatedOrderResult objCreateOrderData = new CreatedOrderResult(); int flag = 0; Dictionary <string, int> returndata = new Dictionary <string, int>(); returndata.Add("status", 0); try { System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; string x_StateName = string.Empty; string x_DistrictName = string.Empty; if (headers.Contains("state")) { x_StateName = headers.GetValues("state").First().ToLower(); } if (headers.Contains("district")) { x_DistrictName = headers.GetValues("district").First().ToLower(); } objCreateOrderData = _rsbal.OrderCreateV2(obj, x_StateName, x_DistrictName); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, obj.userid); } // string json = JsonConvert.SerializeObject(returndata); //HttpContext.Current.Response.ContentType = "application/json; charset=utf-8"; //HttpContext.Current.Response.Write(json); return(objCreateOrderData); }
public IHttpActionResult GetOrderTracking(string version, int UserId) { try { List <OrderTracking> objOrderList = new List <OrderTracking>(); DataSet ds = new DataSet(); ds = BzWebsite.GetOrderTracking(version, UserId); ds.Tables[0].TableName = "Orders"; ds.Tables[1].TableName = "OrderItems"; var Orders = ds.Tables["Orders"].AsEnumerable(); var OrderItems = ds.Tables["OrderItems"].AsEnumerable(); //var kgpBrands = ds1.Tables["KGPBrands"].AsEnumerable(); foreach (var item in Orders) { OrderTracking objOrder = new OrderTracking(); objOrder.OrderId = item.Field <int>("OrderId"); objOrder.TotalSaleValue = item.Field <decimal>("TotalSaleValue"); objOrder.DeliveryCharge = item.Field <decimal>("DeliveryCharge"); objOrder.OrderStatus = item.Field <string>("OrderStatus"); objOrder.OrderDate = item.Field <string>("PurchasedDate"); List <OrderItems> objItems = new List <OrderItems>(); objOrder.OrderItems = objItems; objOrderList.Add(objOrder); } foreach (var item1 in objOrderList) { foreach (var item2 in OrderItems) { if (item2.Field <int>("OrderId") == item1.OrderId) { item1.OrderItems.Add(new OrderItems { // RecordId =item2.Field<long>("RecordId"), PackageId = item2.Field <int>("PackageId"), ProductName = item2.Field <string>("ProductName"), TechnicalName = item2.Field <string>("TechnicalName"), OrderStatus = item2.Field <string>("OrderStatus"), OrderDate = item2.Field <string>("PurchasedDate"), DeliveryDate = item2.Field <string>("DeilveredDate"), Quantity = item2.Field <short>("Quantity"), PackSize = item2.Field <string>("PackSize"), UnitPrice = item2.Field <decimal>("UnitPrice"), SaleValue = item2.Field <decimal>("SaleValue"), ImagePath = item2.Field <string>("ImagePath") }); } } } return(Ok(new { Orders = objOrderList, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { KGPApiReponse = "", Status = false })); } }
public IHttpActionResult BZFarmerAppServices(string version) { try { System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; string x_StateName = string.Empty; string x_DistrictName = string.Empty; if (headers.Contains("state")) { x_StateName = headers.GetValues("state").First().ToLower(); } if (headers.Contains("district")) { x_DistrictName = headers.GetValues("district").First().ToLower(); } DataSet ds = new DataSet(); ds = LiveStocks.AppServices(version, x_StateName, x_DistrictName); if (ds.Tables.Count > 0) { List <dynamic> objlist = new List <dynamic>(); if (ds.Tables.Count > 2) { ds.Tables[0].TableName = "BZFarmerAppServices"; ds.Tables[1].TableName = "District"; ds.Tables[2].TableName = "State"; var Location = new { DistrictId = ds.Tables[1].Rows[0]["DistrictId"], StateId = ds.Tables[2].Rows[0]["State"] }; objlist.Add(Location); } else { var Location = new { DistrictId = "", StateId = "" }; objlist.Add(Location); } DataSet ds1 = new DataSet(); ds.Tables[0].TableName = "BZFarmerAppServices"; ds1.Tables.Add(ds.Tables[0].Copy()); return(Ok(new { BZApiReponse = ds1, Location = objlist, Status = true })); } else { return(Ok(new { BZApiReponse = "", Msg = "Jankari", Status = false })); } } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZApiReponse = "", Msg = "Jankari", Status = false })); } }
public IHttpActionResult GetBZCropBreed(string version, int CropId) { try { DataSet ds = new DataSet(); ds = BZCrops.GetBZCropBreedList(version, CropId); ds.Tables[0].TableName = "CropBreed"; return(Ok(new { BZApiReponse = ds, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { Results = "", Status = false })); } }
public IHttpActionResult GetBZLiveStockBreed(int LiveStockId, string version) { try { DataSet ds = new DataSet(); ds = LiveStocks.BZLiveStockBreed(LiveStockId, version); ds.Tables[0].TableName = "BZLiveStockBreed"; return(Ok(new { BZApiReponse = ds, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZApiReponse = "", Status = false })); } }
public IHttpActionResult PaymentOption(string version) { try { DataSet ds = new DataSet(); ds = BzCatagory.GetPaymentOption(version); ds.Tables[0].TableName = "PaymentOption"; return(Ok(new { BZAppPaymentOption = ds, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZAppPaymentOption = "", Status = false })); } }
public IHttpActionResult Get_BZFarmerAppMainCategory(string version) { try { DataSet ds = new DataSet(); ds = BzCatagory.AppMainCategory(version); ds.Tables[0].TableName = "BZFarmerAppMainCategory"; return(Ok(new { BZAppCatagory = ds, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZAppCatagory = "", Status = false })); } }
public IHttpActionResult GetBzCategoryForProductDetail(int Id, string Type) { try { DataSet ds = new DataSet(); ds = BzWebsite.GetBzCategoryForProductDetail(Id, Type); ds.Tables[0].TableName = "Category"; return(Ok(new { Category = ds, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { Category = "", Status = false })); } }
public IHttpActionResult GetBzPackages(string version, int ProductId) { try { DataSet ds = new DataSet(); ds = BzWebsite.GetBzPackages(version, ProductId); ds.Tables[0].TableName = "Product"; return(Ok(new { ProductsApiReponse = ds, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { ProductsApiReponse = "", Status = false })); } }
public IHttpActionResult GetSubCategory(string version, int?CategoryId) { try { #region Authentication Token //System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; //string token = string.Empty; //string pwd = string.Empty; //if (headers.Contains("username")) //{ // token = headers.GetValues("username").First(); //} //if (headers.Contains("password")) //{ // pwd = headers.GetValues("password").First(); //} #endregion System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; string x_StateName = string.Empty; string x_DistrictName = string.Empty; if (headers.Contains("x_StateName")) { x_StateName = headers.GetValues("x_StateName").First(); } if (headers.Contains("x_DistrictName")) { x_DistrictName = headers.GetValues("x_DistrictName").First(); } DataSet ds1 = new DataSet(); //if (CategoryId == 2) //{ // ds1 = LiveStocks.GetCropDetails(version, CategoryId); //} //else //{ ds1 = LiveStocks.GetSubCategories(version, CategoryId, true, x_StateName, x_DistrictName); //} ds1.Tables[0].TableName = "SubCategory"; return(Ok(new { ProductsApiReponse = ds1, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { ProductsApiReponse = "", Status = false })); } }
public IHttpActionResult GetKGP_Products(string version, int KGP_CategoryId, int KGP_SubCategoryId, int DistrictId, string DistrictName, string PinCode, int PageIndex, int PageSize) { try { DataSet ds1 = new DataSet(); ds1 = KitchenGarden.GetKGP_Products(version, KGP_CategoryId, KGP_SubCategoryId, DistrictId, DistrictName, PinCode, PageIndex, PageSize); ds1.Tables[0].TableName = "KGPCategory"; return(Ok(new { KGPApiReponse = ds1, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { KGPApiReponse = "", Status = false })); } }
public IHttpActionResult GetOrderTrackingStatus(string version, string OrderId) { try { DataSet ds = new DataSet(); ds = BzWebsite.GetOrderTrackingStatus(version, OrderId); ds.Tables[0].TableName = "OrderTrack"; return(Ok(new { TrackingApiResponse = ds, ItemCount = ds.Tables[0].Rows.Count, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { CartApiReponse = "", Status = false })); } }
public IHttpActionResult GetKGPSubCategory(string version, string Type, int Id) { try { DataSet ds1 = new DataSet(); ds1 = KitchenGarden.GetKGPSubCategory(version, Type, Id); ds1.Tables[0].TableName = "KGPSubCategory"; return(Ok(new { KGPApiReponse = ds1, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { KGPApiReponse = "", Status = false })); } }
public IHttpActionResult Get_BZSeasonCrop(string version, int MainCategoryId) { try { DataSet ds = new DataSet(); ds = BzCatagory.AppSeasonCrop(version, MainCategoryId); ds.Tables[0].TableName = "Titles"; ds.Tables[1].TableName = "SeasonCrop"; ds.Tables[2].TableName = "Images"; GetCrop objCrop = new GetCrop(); objCrop.Title = ds.Tables["Titles"].Rows[0]["Title"].ToString(); objCrop.Banner = new List <Banner>(); objCrop.CropSeason = new List <CropSeasons>(); var seasonCrops = ds.Tables["SeasonCrop"].AsEnumerable(); var img = ds.Tables["Images"].AsEnumerable(); foreach (var item in seasonCrops) { objCrop.CropSeason.Add(new CropSeasons { SeasonID = item.Field <int>("SeasonID"), SeasonName = item.Field <string>("SeasonName") }); } foreach (var item1 in img) { objCrop.Banner.Add(new Banner { BannerId = item1.Field <int>("BannerId"), BannerName = item1.Field <string>("BannerName"), BannerType = item1.Field <string>("BannerType"), ImagePath = item1.Field <string>("Image"), isActive = item1.Field <bool>("isActive"), DisplayOrder = item1.Field <int>("DisplayOrder"), IsClickable = item1.Field <bool>("IsClickable"), PackageID = item1.Field <int?>("PackageID") }); } return(Ok(new { SeasonCrop = objCrop, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { SeasonCrop = "", Status = false })); } }
public IHttpActionResult CropPOPPopup(CropPopFarmDetail objFarmDetail) { PostResponse objResponse = new PostResponse(); try { if (!string.IsNullOrWhiteSpace(objFarmDetail.FarmingDuration)) { objFarmDetail.FarmingDuration = objFarmDetail.FarmingDuration.Split('/')[1] + "/" + objFarmDetail.FarmingDuration.Split('/')[0] + "/" + objFarmDetail.FarmingDuration.Split('/')[2]; } else { objFarmDetail.FarmingDuration = System.DateTime.Now.ToString(); } int value = 0; DataSet ds = BZCrops.InsertFarmDetail(objFarmDetail); if (ds != null && ds.Tables.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { value = ds.Tables[0].Rows[0]["ReturnValue"] == DBNull.Value ? 0 : Convert.ToInt32(ds.Tables[0].Rows[i]["ReturnValue"]); } } if (value > 0) { objResponse.Success = true; objResponse.Msg = "आपका विवरण सफलतापूर्वक दर्ज हो गया है।"; } else { objResponse.Success = false; objResponse.Msg = "आपका विवरण दर्ज नहीं हो पाया, पुनः प्रयास करें!"; } return(Ok(new { BZApiReponse = objResponse, Status = true })); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); objResponse.Msg = "Failed."; } return(Ok(new { BZApiReponse = objResponse, Status = false })); }
public SavedProductResult SaveSubDealerProducts(SubDealerProductCreate obj) { ReasonStatusBal _rsbal = new ReasonStatusBal(); SavedProductResult objSavedData = new SavedProductResult(); int flag = 0; Dictionary <string, int> returndata = new Dictionary <string, int>(); returndata.Add("status", 0); try { objSavedData = _rsbal.SaveSubDealerProducts(obj); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, obj.StockId); } return(objSavedData); }
public ApiPostResponse SaveTractorUsersDetailV2(TractorUsers obj) { ReasonStatusBal _rsbal = new ReasonStatusBal(); ApiPostResponse objSavedData = new ApiPostResponse(); int flag = 0; Dictionary <string, int> returndata = new Dictionary <string, int>(); returndata.Add("status", 0); try { objSavedData = _rsbal.SaveTractorUserDetailV2(obj); } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); } return(objSavedData); }
public IHttpActionResult GetProductsBySearch(string version, string SearchText) { try { System.Net.Http.Headers.HttpRequestHeaders headers = this.Request.Headers; string x_StateName = string.Empty; string x_DistrictName = string.Empty; if (headers.Contains("state")) { x_StateName = headers.GetValues("state").First().ToLower(); } if (headers.Contains("district")) { x_DistrictName = headers.GetValues("district").First().ToLower(); } DataSet ds = new DataSet(); DataSet ds1 = new DataSet(); ds = LiveStocks.GetProductsBySearch(version, x_StateName, x_DistrictName, SearchText); ds.Tables[0].TableName = "Product"; var productData = ds.Tables[0].AsEnumerable(); var distinctData = productData.Select(x => x.Field <string>("ProductHindiName")).Distinct(); DataSet ds2 = new DataSet(); ds2.Tables.Add(ds.Tables[0].Copy()); //ds2.Tables.Add(ds1.Tables[0].Copy()); if (ds2.Tables[0].Rows.Count > 0) { return(Ok(new { ProductsApiReponse = ds2, Status = true })); } else { return(Ok(new { ProductsApiReponse = "", Status = false })); } } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { ProductsApiReponse = "", Status = false })); } }
public IHttpActionResult GetBZTips(string version, string SearchCriteria, int MainCategoryId, int Id, string OptionText) { try { DataSet ds = new DataSet(); ds = BzCatagory.GetBZTips(version, SearchCriteria, MainCategoryId, Id, OptionText); ds.Tables[0].TableName = "BZTips"; if (ds.Tables["BZTips"].Rows.Count > 0) { return(Ok(new { BZReponse = ds, Status = true })); } else { return(Ok(new { BZReponse = "", Status = false })); } } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZReponse = "", Status = false })); } }
public IHttpActionResult GetBZFAQCategoryList(string version) { try { DataSet ds = new DataSet(); ds = BzCatagory.GetBZFAQCategoryList(version); ds.Tables[0].TableName = "BZFarmerAppCatagory"; if (ds.Tables["BZFarmerAppCatagory"].Rows.Count > 0) { return(Ok(new { BZAppCatagory = ds, Status = true })); } else { return(Ok(new { BZAppCatagory = "", Status = false })); } } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZAppCatagory = "", Status = false })); } }
public IHttpActionResult GetBZFAQList(BZFAQ obj) { try { DataSet ds = new DataSet(); ds = BzCatagory.GetBZFAQList(obj.version, obj.Name); ds.Tables[0].TableName = "BZFAQ"; if (ds.Tables["BZFAQ"].Rows.Count > 0) { return(Ok(new { BZReponse = ds, Status = true })); } else { return(Ok(new { BZReponse = "", Status = false })); } } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZReponse = "", Status = false })); } }
public IHttpActionResult GetCouponValidity(BZAgentCoupon obj) { try { DataSet ds = new DataSet(); ds = BzCatagory.GetCouponValidity(obj.AgentId, obj.PackageId, obj.CouponCode, obj.quantity, obj.TxnValue); ds.Tables[0].TableName = "CouponDtl"; if (ds.Tables["CouponDtl"].Rows.Count > 0) { return(Ok(new { BZReponse = ds, Status = true })); } else { return(Ok(new { BZReponse = "", Status = false })); } } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZReponse = "", Status = false })); } }
public IHttpActionResult InsertAgentCoupons(BZAgentCoupon obj) { try { DataSet ds = new DataSet(); ds = BzCatagory.InsertAgentCoupons(obj.OrderId, obj.CouponCode, obj.AgentId); ds.Tables[0].TableName = "AgentCoupon"; if (ds.Tables["AgentCoupon"].Rows.Count > 0) { return(Ok(new { BZReponse = ds, Status = true })); } else { return(Ok(new { BZReponse = "", Status = false })); } } catch (Exception ex) { LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0); return(Ok(new { BZReponse = "", Status = false })); } }