GIF89;a
GIF89;a
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using BusinessLayer;
using BusinessLayer.Controllers;
public partial class EducationProgramms : BasePage
{
public string m_Pageng
{
get
{
if (ViewState["m_Pageng"] != null)
{
return ViewState["m_Pageng"].ToString();
}
else
{
return "10";
}
}
set
{
ViewState["m_Pageng"] = value;
}
}
protected void Page_PreRender(object sender, EventArgs e)
{
if (m_Pageng == "10")
{
Button1.Text = (string)this.GetLocalResourceObject("Showall");
GridView1.PageIndex = 0;
GridView1.PageSize = 10;
GridView1.PagerSettings.Visible = false;
}
else
{
Button1.Text = (string)this.GetLocalResourceObject("TOP10");
GridView1.PageSize = 20;
GridView1.PagerSettings.Visible = true;
}
}
protected void Page_Load(object sender, EventArgs e)
{
this.CurrentPage = Globals.CurrentPageId.EducationProgramms;
if (Page.IsPostBack == true)
{
for (int a = 1; a < 32; a++)
{
string key = string.Format("ctl00$ContentPlaceHolder1$GridView1$ctl{0:00}$Checkbox2", a);
string b = Page.Request[key];
}
}
Panel pan_Description = new Panel();
pan_Description.Attributes.Add("id", "Description1");
Label text_Description = new Label();
text_Description.Text = (string)this.GetLocalResourceObject("Description1");
pan_Description.Controls.Add(text_Description);
pnSection1.Controls.Add(pan_Description);
LabelUpdText.Text = GetGlobalResourceObject("Common", "Updatedate").ToString();
LabelUpdDate.Text = PageUpdatedDate;
Button2.OnClientClick = "if(getelementbyid('" +
HiddenField1.ClientID + "').value == '') {alert('" +
Resources.Common.LID_MESSAGE + "'); return false;} return true; ";
BusinessLayer.Controllers.ControllerArticle controller = new BusinessLayer.Controllers.ControllerArticle();
BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article();
article = controller.Get((int)Globals.AJAXHelp.Education_RedButton1);
HelpButtonAjax20.Text = "
" + article.Title
+ "
" + article.ShortText;
}
public void hlpButtAjax_Load(object sender, EventArgs e)
{
ControllerArticle CtrlArticle = new ControllerArticle();
BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article();
article = CtrlArticle.Get((int)Globals.AJAXHelp.Education_Inbest);
((Controls_HelpButtonAjax)sender).Text = "" + article.Title
+ "
" + article.ShortText;
}
public void hlpButtAjax2_Load(object sender, EventArgs e)
{
ControllerArticle CtrlArticle = new ControllerArticle();
BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article();
article = CtrlArticle.Get((int)Globals.AJAXHelp.Education_Sector);
((Controls_HelpButtonAjax)sender).Text = "" + article.Title
+ "
" + article.ShortText;
}
public void hlpButtAjax3_Load(object sender, EventArgs e)
{
ControllerArticle CtrlArticle = new ControllerArticle();
BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article();
article = CtrlArticle.Get((int)Globals.AJAXHelp.Education_Average);
((Controls_HelpButtonAjax)sender).Text = "" + article.Title
+ "
" + article.ShortText;
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label ll;
HtmlInputCheckBox ck;
HyperLink lblName = (HyperLink)e.Row.Cells[0].FindControl("LinkName");
ll = (Label)e.Row.Cells[0].FindControl("Label1");
ck = (HtmlInputCheckBox)e.Row.Cells[0].FindControl("Checkbox2");
ck.Value = lblName.Text;
ck.Attributes.Add("onclick", "javascript:Checkbox1_onclick(this,'" + HiddenField1.ClientID + "')");
lblName.NavigateUrl = "KerenEd.aspx?kerenId=" + ll.Text;
string checkval = HiddenField1.Value;
string[] archeck = checkval.Split(',');
foreach (string i in archeck)
{
if (i == ck.Value && i != "")
{
ck.Checked = true;
}
}
Label lInb;
lInb = (Label)e.Row.Cells[4].FindControl("Label2");
if ( lInb.Text == "" ) lInb.Text = "0";
double m_Inb = Convert.ToDouble(lInb.Text);
lInb.Text = m_Inb.ToString("0");
lInb.Font.Bold = true;
if (m_Inb > 100)
{
lInb.ForeColor = System.Drawing.Color.Green;
}
else if (m_Inb < 100)
{
lInb.ForeColor = System.Drawing.Color.Red;
}
else if (m_Inb == 100)
{
lInb.ForeColor = System.Drawing.Color.Black;
}
LinkButton lblManager = (LinkButton)e.Row.Cells[3].FindControl("LinkManager");
if (lblManager.Text.Length > 30)
{
char[] chars = lblManager.Text.ToCharArray();
for (int counter = 27; counter < chars.Length; ++counter)
{
if (chars[counter] == 160)
{
lblManager.Text = lblManager.Text.Substring(0, counter) +
" " + lblManager.Text.Substring(counter + 1, lblManager.Text.Length - counter - 1);
}
}
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (m_Pageng == "10")
{
m_Pageng = "30";
}
else
{
m_Pageng = "10";
}
}
protected void Button2_Click(object sender, EventArgs e)
{
string[] aMsg = HiddenField1.Value.Split(',');
string m_ids = "";
foreach (string m_msg in aMsg)
{
if (m_ids != "")
{
m_ids += ", " + m_msg;
}
else
{
m_ids += m_msg;
}
}
Page.Session.Add("ToLid_MSG", m_ids);
Go("Lid.aspx");
/*
if (m_ids != "")
{
Go("Lid.aspx?MSG=" + HttpUtility.HtmlEncode(m_ids));
}*/
}
protected void LinkManager_OnClick(object sender, EventArgs e)
{
LinkButton hlManager = sender as LinkButton;
Session["ToManager_ManagerName"] = hlManager.Text;
Go("ManagerKranot.aspx");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
if (sortLink2 != null)
{
if (bool.Parse(sortLink2.Value))
{
GridView1.Sort("Inbest", SortDirection.Descending);
sortLink2.Value = "false";
}
else
{
GridView1.Sort("Inbest", SortDirection.Ascending);
sortLink2.Value = "true";
}
}
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
if (sortLink3 != null)
{
if (bool.Parse(sortLink3.Value))
{
GridView1.Sort("Sector", SortDirection.Descending);
sortLink3.Value = "false";
}
else
{
GridView1.Sort("Sector", SortDirection.Ascending);
sortLink3.Value = "true";
}
}
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
if (sortLink4 != null)
{
if (bool.Parse(sortLink4.Value))
{
GridView1.Sort("AVG_M", SortDirection.Descending);
sortLink4.Value = "false";
}
else
{
GridView1.Sort("AVG_M", SortDirection.Ascending);
sortLink4.Value = "true";
}
}
}
}