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 Globals; using BusinessLayer.Controllers; public partial class Recomendations : BasePage { protected void Page_Load(object sender, EventArgs e) { this.CurrentPage = Globals.CurrentPageId.Analysts; 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; } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { HiddenField HiddnData2 = new HiddenField(); HiddnData2 = (HiddenField)e.Row.Cells[0].FindControl("DataExist1"); int iExist = 0; try { iExist = int.Parse(HiddnData2.Value); } catch { iExist = 0; } LinkButton HLink = (LinkButton)e.Row.Cells[0].FindControl("Link11"); Label lLink = (Label)e.Row.Cells[0].FindControl("Label11"); if (iExist != 0) { HLink.Visible = true; lLink.Visible = false; } else { lLink.Visible = true; HLink.Visible = false; } Label lMark; lMark = (Label)e.Row.Cells[1].FindControl("Label2"); if (lMark.Text == "") { lMark.Text = "0.00"; } double m_Mark = Convert.ToDouble(lMark.Text); lMark.Text = m_Mark.ToString("0.00"); } } protected void Link1_OnClick(object sender, EventArgs e) { LinkButton hlInvestor = sender as LinkButton; Session["ToManager_ManagerName"] = hlInvestor.Text; Go("Manager.aspx"); } protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { HiddenField HiddnData2 = new HiddenField(); HiddnData2 = (HiddenField)e.Row.Cells[0].FindControl("DataExist"); int iExist = 0; try { iExist = int.Parse(HiddnData2.Value); } catch { iExist = 0; } LinkButton HLink = (LinkButton)e.Row.Cells[0].FindControl("Link22"); Label lLink = (Label)e.Row.Cells[0].FindControl("Label1"); if (iExist!=0) { HLink.Visible = true; lLink.Visible = false; } else { lLink.Visible = true; HLink.Visible = false; } Label lMark; lMark = (Label)e.Row.Cells[5].FindControl("Label2"); if (lMark.Text == "") { lMark.Text = "0.00"; } double m_Mark = Convert.ToDouble(lMark.Text); lMark.Text = m_Mark.ToString("0.00"); Label lPrice; lPrice = (Label)e.Row.Cells[3].FindControl("Label4"); if (lPrice.Text == "") { lPrice.Text = "0.00"; } double m_Price = Convert.ToDouble(lPrice.Text); lPrice.Text = m_Price.ToString("0.00"); Label lCurrPrice; lCurrPrice = (Label)e.Row.Cells[4].FindControl("Label5"); if (lCurrPrice.Text == "") { lCurrPrice.Text = "0.00"; } double m_CurrPrice = Convert.ToDouble(lCurrPrice.Text); lCurrPrice.Text = m_CurrPrice.ToString("0.00"); Label lDate; lDate = (Label)e.Row.Cells[2].FindControl("Label3"); DateTime m_date = Convert.ToDateTime(lDate.Text); lDate.Text = m_date.ToString("d"); } } protected void LinkButton1_Click(object sender, EventArgs e) { if (sortMark != null) { if (bool.Parse(sortMark.Value)) { GridView2.Sort("Mark", SortDirection.Descending); sortMark.Value = "false"; } else { GridView2.Sort("Mark", SortDirection.Ascending); sortMark.Value = "true"; } } } protected void Button1_Click(object sender, EventArgs e) { Go("Lid.aspx"); } public void hlpButtAjax1_Load(object sender, EventArgs e) { ControllerArticle CtrlArticle = new ControllerArticle(); String TitleHelp = CtrlArticle.Get((int)Globals.AJAXHelp.Recomendations_Mark).Title; ((Controls_HelpButtonAjax)sender).Text = "