本文整理汇总了C#中BAL.ClsBAL.GetUpdatedCouponDetails方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.GetUpdatedCouponDetails方法的具体用法?C# ClsBAL.GetUpdatedCouponDetails怎么用?C# ClsBAL.GetUpdatedCouponDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BAL.ClsBAL
的用法示例。
在下文中一共展示了ClsBAL.GetUpdatedCouponDetails方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateCashCoupon
protected bool UpdateCashCoupon(string manabusrefNo, string emailID)
{
try
{
bool ress = false;
ObjBAL = new ClsBAL();
ObjBAL.manabusRefNo = manabusrefNo;
_objDataSet = (DataSet)ObjBAL.GetUpdatedCouponDetails();
if (_objDataSet != null)
{
if (_objDataSet.Tables[0].Rows.Count > 0)
{
double amount = Convert.ToDouble(_objDataSet.Tables[0].Rows[0]["AmountAfterPG"].ToString());
if (amount > 0)
{
string couponcode = GenerateCashCoupon();
goto next;
next:
bool REs1 = AddCashCoupon(Convert.ToString(amount), couponcode, emailID);
if (REs1)
{
string body = "Dear Valued Customer, " + ",<br/><br/>" + "Thank you for using LoveJourney.in as your travel partner for booking your Bus Ticket. You can enter the cash coupon ID in the cash coupon box on the personal details page the next time you want to transact on LoveJourney.in and your amount will be adjusted against the fare.<br/><br/>"
+ "Below are the cash coupon details of the cancelled ticket<br/><br/>Cash Coupon ID :" + couponcode + "<br/> Coupon Value: " + amount + "<br/>Expiry Date :" + DateTime.Now.AddMonths(6).ToString()
+ "<br/><br/>Please save the cash coupon ID. This cash coupon can be used during your next transaction on LoveJourney.in. For more details about cash coupon, please visit the frequently asked questions page http://LoveJourney.in/FAQ." +
"<br/><br/>Best regards,<br/>Support Staff.<br/>LoveJourney.in";
Mailsender.SendEmail(emailID, "", "", "LoveJourney Cash Coupon Code", body);
lblMsg.Text = "Cash Coupon Code has been sent to your Email Id Please check";
ress = true;
}
else
{
goto next;
}
}
else if (amount == 0)
{
ress = true;
}
}
}
return ress;
}
catch (Exception ex)
{
throw ex;
}
}
示例2: UpdateCashCoupon
protected bool UpdateCashCoupon(string manabusrefNo, string emailID)
{
try
{
bool ress = false;
ObjManbusBAL = new ClsBAL();
ObjManbusBAL.manabusRefNo = manabusrefNo;
_objDataSet = (DataSet)ObjManbusBAL.GetUpdatedCouponDetails();
if (_objDataSet != null)
{
if (_objDataSet.Tables[0].Rows.Count > 0)
{
double amount = Convert.ToDouble(_objDataSet.Tables[0].Rows[0]["AmountAfterPG"].ToString());
if (amount > 0)
{
string couponcode = GenerateCashCoupon();
goto next;
next:
bool REs1 = AddCashCoupon(Convert.ToString(amount), couponcode, emailID);
if (REs1)
{
string body = "HI " + ",<br/><br/>" + "Thanks for booking ticket. Your new cash coupon code is " + couponcode + " of amount <b>" + amount + "</b><br/>Note: This Coupon will expire with in 6 months." + "<br/><br/>Thanks & Regards,<br/>LoveJourney Team.";
Mailsender.SendEmail(emailID, "", "", "LoveJourney Cash Coupon Code", body);
lblMsg.Text = "Cash Coupon Code has been sent to your Email Id Please check";
ress = true;
}
else
{
goto next;
}
}
else if (amount == 0)
{
ress = true;
}
}
}
return ress;
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (_objDataSet != null)
{
_objDataSet = null;
}
}
}