本文整理汇总了C#中BAL.ClsBAL.GetCancelPercentageByAPI方法的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL.GetCancelPercentageByAPI方法的具体用法?C# ClsBAL.GetCancelPercentageByAPI怎么用?C# ClsBAL.GetCancelPercentageByAPI使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BAL.ClsBAL
的用法示例。
在下文中一共展示了ClsBAL.GetCancelPercentageByAPI方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetCancellationPolicy
public static string GetCancellationPolicy(String travelsName, String busType)
{
try
{
StringBuilder sbCancellation = new StringBuilder();
DataTable dtCancellation = null;
ClsBAL objManabusBAL = new ClsBAL();
objManabusBAL.api = travelsName.ToString();
dtCancellation = objManabusBAL.GetCancelPercentageByAPI().Tables[0];
if (dtCancellation.Rows.Count > 0)
{
sbCancellation.Append("<table width='450px' cellpadding='5'><tr><th colspan='2' align='center'>");
sbCancellation.Append("Operator: " + travelsName + " || Type: " + busType);
sbCancellation.Append("</th></tr><tr><td colspan='2'> </td></tr><tr><th>Cancellation Time</th><th>Percentage</th></tr>");
foreach (DataRow dr in dtCancellation.Rows)
{
sbCancellation.Append("<tr><td >");
sbCancellation.Append(dr["BeforeTime"]);
sbCancellation.Append("</td><td>");
sbCancellation.Append(dr["CancePercentage"]);
sbCancellation.Append("</td></tr>");
}
sbCancellation.Append("<tr><td ></td>");
sbCancellation.Append("<td align='right'> <img alt='i' src='Images/001_051.png' onclick='CloseDiv();' title='Click to close'/> </td>");
sbCancellation.Append("</tr></table>");
}
else
{
sbCancellation.Append("<table width='450px' cellpadding='5'><tr><th colspan='2' align='center'>");
sbCancellation.Append("Operator: " + travelsName + " || Type: " + busType);
sbCancellation.Append("</th></tr><tr><td colspan='2'> </td></tr><tr><th>Cancellation Time</th><th>Percentage</th></tr>");
sbCancellation.Append("<tr><td colspan='2'> No Cancellation Policy Found. </td></tr><tr><td ></td>");
sbCancellation.Append("<td align='right'> <img alt='i' src='Images/001_051.png' onclick='CloseDiv();' title='Click to close'/> </td></tr></table>");
}
return sbCancellation.ToString();
}
catch (Exception)
{
throw;
}
}
示例2: GetCancellationPolicy
protected void GetCancellationPolicy(string API)
{
try
{
ClsBAL ObjManbusBAL = new ClsBAL();
ObjManbusBAL.api = API;
DataSet _objDataSet = (DataSet)ObjManbusBAL.GetCancelPercentageByAPI();
if (_objDataSet != null)
{
if (_objDataSet.Tables.Count > 0)
{
gvCancellationDetails.DataSource = _objDataSet.Tables[0];
gvCancellationDetails.DataBind();
}
}
}
catch (Exception ex)
{
throw ex;
}
}
示例3: GetCancellationPolicy
protected void GetCancellationPolicy(string travelname)
{
try
{
ClsBAL objManabusBAL = new ClsBAL();
if (travelname.Length >= 5)
{
objManabusBAL.api = travelname.Substring(0, 5);
}
else { objManabusBAL.api = travelname; }
DataSet ObjDataset = (DataSet)objManabusBAL.GetCancelPercentageByAPI();
if (ObjDataset != null)
{
if (ObjDataset.Tables[0].Rows.Count > 0)
{
gvCancellationDetails.DataSource = ObjDataset.Tables[0];
gvCancellationDetails.DataBind();
}
else { gvCancellationDetails.DataSource = null; gvCancellationDetails.DataBind(); }
}
else { gvCancellationDetails.DataSource = null; gvCancellationDetails.DataBind(); }
}
catch (Exception ex)
{
lblMsg.InnerHtml = ex.Message;
throw ex;
}
}
示例4: GetCancellationPolicy
protected void GetCancellationPolicy(string travelname)
{
try
{
objBAL = new ClsBAL();
if (travelname.Length >= 5)
{
objBAL.api = travelname.Substring(0, 5);
}
else { objBAL.api = travelname; }
ObjDataset = (DataSet)objBAL.GetCancelPercentageByAPI();
if (ObjDataset != null)
{
if (ObjDataset.Tables[0].Rows.Count > 0)
{
gvCancellationDetails.DataSource = ObjDataset.Tables[0];
gvCancellationDetails.DataBind();
}
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (ObjDataset != null)
{
ObjDataset = null;
}
}
}
示例5: GetCancellationPolicy
protected void GetCancellationPolicy(string travelname)
{
try
{
ClsBAL ObjManbusBAL = new ClsBAL();
ObjManbusBAL.api =Convert.ToString(travelname);
DataSet ds = (DataSet)ObjManbusBAL.GetCancelPercentageByAPI();
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
gvCancellationDetails.DataSource = ds.Tables[0];
gvCancellationDetails.DataBind();
}
else { gvCancellationDetails.DataSource = null; gvCancellationDetails.DataBind(); }
}
else { gvCancellationDetails.DataSource = null; gvCancellationDetails.DataBind(); }
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (ds != null)
{
ds = null;
}
}
}
示例6: GetCancellationPolicy
protected void GetCancellationPolicy(string API)
{
try
{
ObjManbusBAL = new ClsBAL();
//if (API.Length >= 5)
//{
// ObjManbusBAL.api = API.Substring(0, 5);
//}
//else { ObjManbusBAL.api = API; }
ObjManbusBAL.api = API;
_objDataSet = (DataSet)ObjManbusBAL.GetCancelPercentageByAPI();
if (_objDataSet != null)
{
if (_objDataSet.Tables.Count > 0)
{
gvCancellationDetails.DataSource = _objDataSet.Tables[0];
gvCancellationDetails.DataBind();
}
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (_objDataSet != null)
{
_objDataSet = null;
}
}
}