using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class A_Report_Print : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblerror.Text = "جاري التحميل";
lblFrom.Text = Request.QueryString["MonthFN"].ToString() + " / " + Request.QueryString["YearF"].ToString();
lblTo.Text = Request.QueryString["MonthTN"].ToString() + " / " + Request.QueryString["YearT"].ToString();
lblNameQ.Text = Request.QueryString["NameQ"].ToString();
grdDaily.DataBind();
if (grdDaily.Rows.Count == 0)
{
grdDailyT.Visible = false;
}
else
grdDailyT.Visible = true;
GrdDivMuslim.DataBind();
if (GrdDivMuslim.Rows.Count == 0)
{
DivMuslim.Visible = false;
}
else
DivMuslim.Visible = true;
grdAuthor.DataBind();
if (grdAuthor.Rows.Count == 0)
{
grdAuthorT.Visible = false;
}
else
grdAuthorT.Visible = true;
GrdWordReview.DataBind();
if (GrdWordReview.Rows.Count == 0)
{
GrdWordReviewT.Visible = false;
}
else
GrdWordReviewT.Visible = true;
GrdWordTranslate.DataBind();
if (GrdWordTranslate.Rows.Count == 0)
{
GrdWordTranslateT.Visible = false;
}
else
GrdWordTranslateT.Visible = true;
GrdVistival.DataBind();
if (GrdVistival.Rows.Count == 0)
{
GrdVistivalT.Visible = false;
}
else
GrdVistivalT.Visible = true;
GrdVisit.DataBind();
if (GrdVisit.Rows.Count == 0)
{
GrdVisitT.Visible = false;
}
else
GrdVisitT.Visible = true;
GrdReportAll.DataBind();
if (GrdReportAll.Rows.Count == 0)
{
GrdReportAllT.Visible = false;
}
else
GrdReportAllT.Visible = true;
GrdOpenDay.DataBind();
if (GrdOpenDay.Rows.Count == 0)
{
GrdOpenDayT.Visible = false;
}
else
GrdOpenDayT.Visible = true;
GrdNonMuslim.DataBind();
if (GrdNonMuslim.Rows.Count == 0)
{
GrdNonMuslimT.Visible = false;
}
else
GrdNonMuslimT.Visible = true;
GrdNewView.DataBind();
if (GrdNewView.Rows.Count == 0)
{
GrdNewViewT.Visible = false;
}
else
GrdNewViewT.Visible = true;
GrdMuslim.DataBind();
if (GrdMuslim.Rows.Count == 0)
{
GrdMuslimT.Visible = false;
}
else
GrdMuslimT.Visible = true;
GrdLessons.DataBind();
if (GrdLessons.Rows.Count == 0)
{
GrdLessonsT.Visible = false;
}
else
GrdLessonsT.Visible = true;
GrdlessonRoom.DataBind();
if (GrdlessonRoom.Rows.Count == 0)
{
GrdlessonRoomT.Visible = false;
}
else
GrdlessonRoomT.Visible = true;
GrdArabic.DataBind();
if (GrdArabic.Rows.Count == 0)
{
GrdArabicT.Visible = false;
}
else
GrdArabicT.Visible = true;
GrdActivity.DataBind();
if (GrdActivity.Rows.Count == 0)
{
GrdActivityT.Visible = false;
}
else
GrdActivityT.Visible = true;
GrdYoutube.DataBind();
if (GrdYoutube.Rows.Count == 0)
{
GrdYoutubeT.Visible = false;
}
else
GrdYoutubeT.Visible = true;
lblerror.Text = "";
}
}
protected void grdDocs_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//------------------ Have Document or Not ---------------------
String Act_Design, Act_Montag, Act_Prepair, Act_Cat, Act_Review, Act_Search, Act_Edit, Act_Write, Act_Select, Act_other;
Act_Design = (String)e.Row.Cells[1].Text;
Act_Montag = (String)e.Row.Cells[2].Text;
Act_Prepair = (String)e.Row.Cells[3].Text;
Act_Cat = (String)e.Row.Cells[4].Text;
Act_Review = (String)e.Row.Cells[5].Text;
Act_Search = (String)e.Row.Cells[6].Text;
Act_Edit = (String)e.Row.Cells[7].Text;
Act_Write = (String)e.Row.Cells[8].Text;
Act_Select = (String)e.Row.Cells[9].Text;
Act_other = (String)e.Row.Cells[10].Text;
if (Act_Design == "0")
e.Row.Cells[1].Text = "";
else
e.Row.Cells[1].Text = "";
if (Act_Montag == "0")
e.Row.Cells[2].Text = "";
else
e.Row.Cells[2].Text = "";
if (Act_Prepair == "0")
e.Row.Cells[3].Text = "";
else
e.Row.Cells[3].Text = "";
if (Act_Cat == "0")
e.Row.Cells[4].Text = "";
else
e.Row.Cells[4].Text = "";
if (Act_Review == "0")
e.Row.Cells[5].Text = "";
else
e.Row.Cells[5].Text = "";
if (Act_Search == "0")
e.Row.Cells[6].Text = "";
else
e.Row.Cells[6].Text = "";
if (Act_Edit == "0")
e.Row.Cells[7].Text = "";
else
e.Row.Cells[7].Text = "";
if (Act_Write == "0")
e.Row.Cells[8].Text = "";
else
e.Row.Cells[8].Text = "";
if (Act_Select == "0")
e.Row.Cells[9].Text = "";
else
e.Row.Cells[9].Text = "";
if (Act_other == "0")
e.Row.Cells[10].Text = "";
else
e.Row.Cells[10].Text = "";
}
}
}