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 BasketShares : BasePage { protected void Page_Load(object sender, EventArgs e) { this.CurrentPage = CurrentPageId.BasketShares; 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; "; Button1.OnClientClick = Button2.OnClientClick; DivTitleTable1.Visible = false; DivTitleTable2.Visible = false; if (GridView2.Rows.Count > 0) { DivTitleTable2.Visible = true; } if (GridView1.Rows.Count > 0) { DivTitleTable1.Visible = true; } BusinessLayer.Controllers.ControllerArticle controller = new BusinessLayer.Controllers.ControllerArticle(); BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article(); article = controller.Get((int)Globals.AJAXHelp.BasketShares_Title); 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.BasketShares_Madad); ((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.BasketShares_Fee); ((Controls_HelpButtonAjax)sender).Text = "
" + article.Title + "

" + article.ShortText; } protected void LinkButton2_Click(object sender, EventArgs e) { if (sortCommisions != null) { if (bool.Parse(sortCommisions.Value)) { GridView1.Sort("Commisions", SortDirection.Descending); sortCommisions.Value = "false"; } else { GridView1.Sort("Commisions", SortDirection.Ascending); sortCommisions.Value = "true"; } } } protected void LinkButton22_Click(object sender, EventArgs e) { if (sortProperty != null) { if (bool.Parse(sortProperty.Value)) { GridView1.Sort("Property", SortDirection.Descending); sortProperty.Value = "false"; } else { GridView1.Sort("Property", SortDirection.Ascending); sortProperty.Value = "true"; } } } protected void LinkButton_2_2_Click(object sender, EventArgs e) { if (sortProperty2 != null) { if (bool.Parse(sortProperty2.Value)) { GridView2.Sort("Property", SortDirection.Descending); sortProperty2.Value = "false"; } else { GridView2.Sort("Property", SortDirection.Ascending); sortProperty2.Value = "true"; } } } protected void LinkButton_2_22_Click(object sender, EventArgs e) { if (sortProperty2 != null) { if (bool.Parse(sortProperty2.Value)) { GridView2.Sort("Property", SortDirection.Descending); sortProperty2.Value = "false"; } else { GridView2.Sort("Property", SortDirection.Ascending); sortProperty2.Value = "true"; } } } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if(!DivTitleTable1.Visible) { DivTitleTable1.Visible = true; } HyperLink Hlink; HtmlInputHidden Hidden_id; Hidden_id = (HtmlInputHidden)e.Row.Cells[1].FindControl("Hidden1"); Hlink = (HyperLink)e.Row.Cells[0].FindControl("Link1"); Hlink.NavigateUrl +="?selectID="+ Hidden_id.Value; Label ll; HtmlInputCheckBox ck; ll = (Label)e.Row.Cells[0].FindControl("LabBuff1"); ck = (HtmlInputCheckBox)e.Row.Cells[0].FindControl("Checkbox2"); ck.Value = ll.Text; ck.Attributes.Add("onclick", "javascript:Checkbox1_onclick(this,'" + HiddenField1.ClientID + "')"); string checkval = HiddenField1.Value; string[] archeck = checkval.Split(','); foreach (string i in archeck) { if (i != "") { if (i == ck.Value) { ck.Checked = true; } } } ll = (Label)e.Row.Cells[5].FindControl("LabCommisions1"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.00") + "%"; } } protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (!DivTitleTable2.Visible) { DivTitleTable2.Visible = true; } HyperLink Hlink; HtmlInputHidden Hidden_id; Hidden_id = (HtmlInputHidden)e.Row.Cells[1].FindControl("Hidden1"); Hlink = (HyperLink)e.Row.Cells[0].FindControl("Link1"); Hlink.NavigateUrl += "?selectID=" + Hidden_id.Value; Label ll; HtmlInputCheckBox ck; ll = (Label)e.Row.Cells[0].FindControl("LabBuff2"); ck = (HtmlInputCheckBox)e.Row.Cells[0].FindControl("Checkbox3"); ck.Value = ll.Text; ck.Attributes.Add("onclick", "javascript:Checkbox1_onclick(this,'" + HiddenField1.ClientID + "')"); string checkval = HiddenField1.Value; string[] archeck = checkval.Split(','); foreach (string i in archeck) { if (i != "") { if (i == ck.Value) { ck.Checked = true; } } } ll = (Label)e.Row.Cells[5].FindControl("LabCommisions2"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.00") + "%"; } } 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"); } }