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


C# ClsBAL.AddCancellation方法代码示例

本文整理汇总了C#中BAL.ClsBAL.AddCancellation方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.AddCancellation方法的具体用法?C# ClsBAL.AddCancellation怎么用?C# ClsBAL.AddCancellation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BAL.ClsBAL的用法示例。


在下文中一共展示了ClsBAL.AddCancellation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddCancellation

    protected void AddCancellation(int bookingId, int tentativeId, string seatNos, string emailId, string refundAmt, string CancelCharges, string APIName, int Hours)
    {
        try
        {
            objBAL = new ClsBAL();
            objBAL.bookingId = Convert.ToInt32(bookingId);
            objBAL.tentativeId = Convert.ToInt32(tentativeId);
            objBAL.cancelSeats = seatNos;
            objBAL.emailId = emailId;
            objBAL.refundAmount = refundAmt;
            objBAL.cancellationCharges = CancelCharges;

            objBAL.couponNo = lblCode.Text.ToString();
            objBAL.createdBy = Convert.ToInt32(Session["UserID"]);
            objBAL.APIName = APIName.ToString().ToUpper();
            objBAL.Hours = Hours;
            ObjDataset = (DataSet)objBAL.AddCancellation();
            if (ObjDataset != null)
            {
                if (ObjDataset.Tables.Count > 0)
                {
                    if (ObjDataset.Tables[0].Rows.Count > 0)
                    {
                        if (ObjDataset.Tables[0].Rows[0]["CouponNo"].ToString() == "Already Exists")
                        {
                            AddCancellation(bookingId, tentativeId, seatNos, emailId, refundAmt, CancelCharges, APIName, Hours);
                        }
                        else if (ObjDataset.Tables[0].Rows[0]["CouponNo"].ToString() == "Success")
                        {
                            lblMsg.Text = "Ticket cancelled successfully.";
                            lblMsg.ForeColor = System.Drawing.Color.Green;
                            if (ViewState["APIName"] != null)
                            {
                                if (ViewState["APIName"].ToString() == "Bitla")
                                {
                                    gvPartialCancellation.Visible = rbtnlstCancelType.Visible = btnConfrmCancel.Visible = false;
                                }
                                else if (ViewState["APIName"].ToString() == "Kesineni")
                                {
                                    gvPartialCancellation.Visible = rbtnlstCancelType.Visible = btnConfrmCancel.Visible = false;
                                }
                            }
                        }
                        else
                        {
                            lblMsg.Text = "Failed to insert.";
                        }
                    }
                    else
                    {
                        lblMsg.Text = "Failed to insert.";
                    }
                }
                else
                {
                    lblMsg.Text = "Failed to insert.";
                }
            }
            else
            {
                lblMsg.Text = "Failed to insert.";
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:68,代码来源:CancelTicket.aspx.cs

示例2: AddCancellation

    protected void AddCancellation(int bookingId, int tentativeId, string seatNos, string emailId, string refundAmt, string CancelCharges)
    {
        try
        {
            objBAL = new ClsBAL();
            objBAL.bookingId = Convert.ToInt32(bookingId);
            objBAL.tentativeId = Convert.ToInt32(tentativeId);
            objBAL.cancelSeats = seatNos;
            objBAL.emailId = emailId;
            objBAL.refundAmount = refundAmt;
            objBAL.cancellationCharges = CancelCharges;
            lblCode.Text = "Can" + GeneratePromocode();
            objBAL.couponNo = lblCode.Text.ToString();
            objBAL.createdBy = Convert.ToInt32(Session["UserID"].ToString());
            ObjDataset = (DataSet)objBAL.AddCancellation();
            if (ObjDataset != null)
            {
                if (ObjDataset.Tables.Count > 0)
                {
                    if (ObjDataset.Tables[0].Rows.Count > 0)
                    {
                        if (ObjDataset.Tables[0].Rows[0]["CouponNo"].ToString() == "Already  Exists")
                        {
                            AddCancellation(bookingId, tentativeId, seatNos, emailId, refundAmt, CancelCharges);
                        }
                        else if (ObjDataset.Tables[0].Rows[0]["CouponNo"].ToString() == "Success")
                        {
                            lblMsg.Text = "Ticket cancelled successfully.Cash Coupon Code has been sent to your Email Id Please check";
                            lblMsg.ForeColor = System.Drawing.Color.Green;
                            txtEmailID.Text = txtMBRefNo.Text = "";
                            if (ViewState["APIName"] != null)
                            {
                                if (ViewState["APIName"].ToString() == "Bitla")
                                {
                                    gvPartialCancellation.Visible = rbtnlstCancelType.Visible = btnConfrmCancel.Visible = false;
                                }
                                else if (ViewState["APIName"].ToString() == "Kesineni")
                                {
                                    gvPartialCancellation.Visible = rbtnlstCancelType.Visible = btnConfrmCancel.Visible = false;
                                    txtEmailID.Text = txtMBRefNo.Text = "";
                                }
                            }
                            string body = "HI " + Session["NameMail"].ToString() + ",<br/><br/>" + "Ticket has been cancelled successfully. Your Cash coupon code is " + lblCode.Text.ToString() + "<br/>Note: This Coupon will expire with in 6 months." + "<br/><br/>Thanks & Regards,<br/>LoveJourney Team.";
                            Mailsender.SendEmail(Session["EmailIdMail"].ToString(), "", "", "LoveJourney Cash Coupon Code", body);
                            lblMsg.Text = "Ticket cancelled successfully.Cash Coupon Code has been sent to your Email Id Please check";
                        }
                        else
                        {
                            lblMsg.Text = "Failed to insert..Try Again";
                        }
                    }
                    else
                    {
                        lblMsg.Text = "Failed to insert..Try Again";
                    }
                }
                else
                {
                    lblMsg.Text = "Failed to insert..Try Again";
                }
            }
            else
            {
                lblMsg.Text = "Failed to insert..Try Again";
            }
        }
        catch (Exception ex)
        {

            throw ex;
        }
    }
开发者ID:srisai339,项目名称:LoveJourney_Working,代码行数:72,代码来源:CancelTicket.aspx.cs


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