protected bool AddCashCoupon() { try { objBAL = new ClsBAL(); lblCode.Text = "CC" + GeneratePassword(); objBAL.name = ddlserviceName.SelectedValue; objBAL.couponNo = Convert.ToString(txtcahcoupon.Text); objBAL.emailId = Convert.ToString(txtEmailID.Text); objBAL.Amount = Convert.ToString(txtAmount.Text); // objBAL.MinAmount = txtminamt.Text.Trim(); // objBAL.MaxAmount = txtmaxamt.Text.Trim(); objBAL.createdBy = Convert.ToInt32(Session["UserID"]); if (objBAL.AddCashCoupon(ref lblMsg)) { return true; } else if (lblMsg.Text == "Already Cash Coupon with this Number Exists") { return false; } else { return false; } } catch (Exception ex) { throw ex; } }
protected bool AddCashCoupontest() { try { objBAL = new ClsBAL(); objBAL.couponNo = Convert.ToString(GeneratePassword()); objBAL.emailId = Convert.ToString(txtEmailID.Text); objBAL.Amount = Convert.ToString(txtAmount.Text); objBAL.createdBy = Convert.ToInt32(Session["UserID"]); if (objBAL.AddCashCoupon(ref lblMsg)) { return true; } else if (lblMsg.Text == "Already Cash Coupon with this Number Exists") { return false; } else { return false; } } catch (Exception ex) { throw ex; } }
protected bool AddCashCoupon(string Amount, string couponCode, string emailid) { try { ObjBAL = new ClsBAL(); ObjBAL.couponNo = Convert.ToString(couponCode); ObjBAL.emailId = Convert.ToString(emailid); ObjBAL.Amount = Convert.ToString(Amount); ObjBAL.createdBy = null; if (ObjBAL.AddCashCoupon(ref lblMsg)) { return true; } else if (lblMsg.Text == "Already Cash Coupon with this Number Exists") { return false; } else { return false; } } catch (Exception ex) { throw ex; } }