本文整理汇总了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;
}
}
示例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;
}
}