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 AddtoCartResult AddToCart(BzCartItems obj) { AddtoCartResult objCreateData = new LogData().AddToCart(obj.InType, obj.CartItemId, obj.UserId, obj.BzProductId, obj.Quantity); return(objCreateData); }