111,120
社区成员
发帖
与我相关
我的任务
分享
protected void gvCurrentEnrolment_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (Convert.ToDecimal(((Label)e.Row.FindControl("lblPaymentStatus")).Text) <= 0)
{
((Label)e.Row.FindControl("lblPaymentStatus")).Text = "Fully Paid<br/>(Total Paid: $" + Convert.ToDecimal(((Label)e.Row.FindControl("lblPaid")).Text) + ")";
}
else
{
((Label)e.Row.FindControl("lblPaymentStatus")).Text = "Awaiting Payment<br/>(Outstanding : $" + ((Label)e.Row.FindControl("lblPaymentStatus")).Text + ")";
}
if (Roles.IsUserInRole(Membership.GetUser().UserName, "staff_manager") && ((Label)e.Row.FindControl("lblEnrolmentStatus")).Text == "Enrolled")
{
((ImageButton)e.Row.FindControl("imgbtnTransfer")).Visible = true;
}
}
}