当前位置: 首页>>代码示例>>C#>>正文


C# ClsBAL.GetUpdatedCouponDetails方法代码示例

本文整理汇总了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;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:53,代码来源:BookByCashCoupon.aspx.cs

示例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;
            }
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:58,代码来源:redirect.aspx.cs


注:本文中的BAL.ClsBAL.GetUpdatedCouponDetails方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。