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 })); } }
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 })); } }