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.Controllers; using BusinessLayer.BOObjects; using BusinessLayer.Entities; using AjaxControlToolkit; public partial class KerenEd : BasePage { string m_kerenName = string.Empty; protected void Page_Load(object sender, EventArgs e) { int ID = 0; this.CurrentPage = Globals.CurrentPageId.KerenHishtalmut; if (this.Request.QueryString["kerenId"] != null) { ID = int.Parse(this.Request.QueryString["kerenId"].ToString()); } LabelUpdText.Text = GetGlobalResourceObject("Common", "Updatedate").ToString(); LabelUpdDate.Text = PageUpdatedDate; ControllerKeren CtrlKeren = new ControllerKeren(); BusinessLayer.Entities.KerenNeemanut KerenNeem = CtrlKeren.GetKerenHistalmut(ID); if (KerenNeem.Id > 0) { m_kerenName = KerenNeem.Name; //table#1 Label lab = new Label(); HyperLink hrlMAnager = new HyperLink(); lab.Text = KerenNeem.Name; tdCompanyName.Controls.Add(lab); lab = new Label(); lab.Text = KerenNeem.Id.ToString(); tdNumber.Controls.Add(lab); lab = new Label(); hrlMAnager.Text = KerenNeem.Manager; Page.Session.Add("ToManager_ManagerName", KerenNeem.Manager); hrlMAnager.NavigateUrl = "~/ManagerKranot.aspx"; tdManager.Controls.Add(hrlMAnager); //table#2 lab = new Label(); if (KerenNeem.INBEST_AVG < 0) lab.Text = (-1 * KerenNeem.INBEST_AVG).ToString("0") + "-"; else lab.Text = KerenNeem.INBEST_AVG.ToString("0"); lab.Font.Bold = true; lab.ForeColor = InbestColor(lab.Text); tdInBestAvarage.Controls.Add(lab); lab = new Label(); if (KerenNeem.AVG36_M < 0) lab.Text = (-1 * KerenNeem.AVG36_M).ToString("0.0") + "%" + "-"; else lab.Text = KerenNeem.AVG36_M.ToString("0.0") + "%"; tdSpecialization.Controls.Add(lab); ControllerArticle CtrlArticle = new ControllerArticle(); BusinessLayer.Entities.Article article = new Article(); article = CtrlArticle.Get((int)Globals.AJAXHelp.KerenEd_Commisions); HelpButtonAjax1.Text = "
" + article.Title + "

" + article.ShortText; article = new Article(); article = CtrlArticle.Get((int)Globals.AJAXHelp.KerenEd_Fee); HelpButtonAjax3.Text = "
" + article.Title + "

" + article.ShortText; lab = new Label(); lab.Text = KerenNeem.Commision.ToString("0.00") + "%"; tdFee.Controls.Add(lab); lab = new Label(); if (KerenNeem.INBEST_AVG_NOFEE < 0) lab.Text = (-1 * KerenNeem.INBEST_AVG_NOFEE).ToString("0") + "-"; else lab.Text = KerenNeem.INBEST_AVG_NOFEE.ToString("0"); lab.Font.Bold = true; lab.ForeColor = InbestColor(lab.Text); tdCommisions.Controls.Add(lab); lab = new Label(); if (KerenNeem.JustifiedFee > 0) { lab.Text = KerenNeem.JustifiedFee.ToString("0.00") + "%"; } else { if (KerenNeem.JustifiedFee == -999) // SHARP < 0 lab.Text = "-"; else lab.Text = "0.00%"; } tdJustifiedFee.Controls.Add(lab); article = new Article(); article = CtrlArticle.Get((int)Globals.AJAXHelp.KerenEd_JustifiedFee); HelpButtonAjax12.Text = "
" + article.Title + "

" + article.ShortText; if (KerenNeem.Madadim.Count > 0) { GridView1.DataSource = KerenNeem.Madadim; GridView1.DataBind(); article = CtrlArticle.Get((int)Globals.AJAXHelp.KerenEd_Madad); HelpButtonAjax13.Text = "
" + article.Title + "

" + article.ShortText; } } } Table TitleTableAjax(Controls_HelpButtonAjax HelpAjaxBttn, Label lablText, int IdMsg) { Table Tabl = new Table(); TableRow TablR = new TableRow(); TableCell TablC = new TableCell(); TablC.Controls.Add(lablText); TablC.HorizontalAlign = HorizontalAlign.Center; TablR.Controls.Add(TablC); Tabl.Controls.Add(TablR); TablR = new TableRow(); TablC = new TableCell(); TablC.HorizontalAlign = HorizontalAlign.Center; Panel pnAjaxBttn = new Panel(); ControllerArticle CtrlArticle = new ControllerArticle(); String TitleHelp = CtrlArticle.Get(IdMsg).Title; HelpAjaxBttn.Text = "
" + TitleHelp + "

" + CtrlArticle.Get(IdMsg).ShortText; pnAjaxBttn.Width = 25; pnAjaxBttn.Controls.Add(HelpAjaxBttn); HelpAjaxBttn.Visible = true; TablC.Controls.Add(pnAjaxBttn); TablR.Controls.Add(TablC); Tabl.Controls.Add(TablR); return Tabl; } protected void Button2_Click(object sender, EventArgs e) { Page.Session.Add("ToLid_MSG", m_kerenName); Go("Lid.aspx"); } }