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 Globals; public partial class PikdonotAttachedMadad : BasePage { protected void Page_Load(object sender, EventArgs e) { this.CurrentPage = CurrentPageId.PikdonotAttachedMadad; BusinessLayer.Controllers.PikdonotAdvance q = new PikdonotAdvance(); Button2.OnClientClick = "if(getelementbyid('" + HiddenField1.ClientID + "').value == '') {alert('" + Resources.Common.LID_MESSAGE + "'); return false;} return true; "; GridView1.DataSource = q.GetBanks(Globals.Pikadon.AttachToMadad); GridView1.DataSourceID = ""; DivTitleTable1.Visible = false; DivTitleTable2.Visible = false; GridView1.DataBind(); GridView3.DataBind(); if (DivTitleTable2.Visible) { HelpButtonAjax2.Visible = true; ControllerArticle CtrlArticle = new ControllerArticle(); BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article(); article = CtrlArticle.Get((int)Globals.AJAXHelp.PikdonotMadad_Title1); HelpButtonAjax2.Text = "
" + article.Title + "

" + article.ShortText; } 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); #region Updated date BusinessLayer.BOObjects.General general = new BusinessLayer.BOObjects.General(); LabelUpdText.Text = GetGlobalResourceObject("Common", "Updatedate").ToString(); LabelUpdDate.Text = general.GetUpdatedDate(CurrentPageId.Pikdonot).ToShortDateString(); lblGalil.Text = GetGlobalResourceObject("Common", "Updatedate").ToString(); dateGalil.Text = general.GetUpdatedDate(CurrentPageId.Galil).ToShortDateString(); #endregion } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { DivTitleTable1.Visible = true; Label ll; HtmlInputCheckBox ck; ll = (Label)e.Row.Cells[0].FindControl("Label1"); 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[2].FindControl("LabProc20000"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.00") + "%"; ll = (Label)e.Row.Cells[2].FindControl("LabProc50000"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.00") + "%"; ll = (Label)e.Row.Cells[2].FindControl("LabProc100000"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.00") + "%"; } } protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { DivTitleTable2.Visible = true; Label ll; HtmlInputCheckBox ck; ll = (Label)e.Row.Cells[0].FindControl("Label33"); ck = (HtmlInputCheckBox)e.Row.Cells[0].FindControl("Checkbox33"); 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[2].FindControl("LabExecutedDate2"); DateTime m_date = Convert.ToDateTime(ll.Text); ll.Text = m_date.ToString("d"); ll = (Label)e.Row.Cells[4].FindControl("LabSalvation2"); ll.Text = Convert.ToDecimal(ll.Text).ToString("0.00"); ll = (Label)e.Row.Cells[2].FindControl("LabProcent2"); ll.Text = Convert.ToDecimal(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; } } Go("Lid.aspx?MSG=" + HttpUtility.HtmlEncode(m_ids)); } public void hlpButtAjax21_Load(object sender, EventArgs e) { ControllerArticle CtrlArticle = new ControllerArticle(); BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article(); article = CtrlArticle.Get((int)Globals.AJAXHelp.PikdonotMadad_col4); ((Controls_HelpButtonAjax)sender).Text = "
" + article.Title + "

" + article.ShortText; } public void hlpButtAjax22_Load(object sender, EventArgs e) { ControllerArticle CtrlArticle = new ControllerArticle(); BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article(); article = CtrlArticle.Get((int)Globals.AJAXHelp.PikdonotMadad_col3); ((Controls_HelpButtonAjax)sender).Text = "
" + article.Title + "

" + article.ShortText; } public void hlpButtAjax23_Load(object sender, EventArgs e) { ControllerArticle CtrlArticle = new ControllerArticle(); BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article(); article = CtrlArticle.Get((int)Globals.AJAXHelp.PikdonotMadad_col2); ((Controls_HelpButtonAjax)sender).Text = "
" + article.Title + "

" + article.ShortText; } public void hlpButtAjax24_Load(object sender, EventArgs e) { ControllerArticle CtrlArticle = new ControllerArticle(); BusinessLayer.Entities.Article article = new BusinessLayer.Entities.Article(); article = CtrlArticle.Get((int)Globals.AJAXHelp.PikdonotMadad_col1); ((Controls_HelpButtonAjax)sender).Text = "
" + article.Title + "

" + article.ShortText; } protected void LinkButton21_Click(object sender, EventArgs e) { if (sortCol4 != null) { if (bool.Parse(sortCol4.Value)) { GridView3.Sort("Procent", SortDirection.Descending); sortCol4.Value = "false"; } else { GridView3.Sort("Procent", SortDirection.Ascending); sortCol4.Value = "true"; } } } protected void LinkButton22_Click(object sender, EventArgs e) { if (sortCol5 != null) { if (bool.Parse(sortCol5.Value)) { GridView3.Sort("ExecutedDate", SortDirection.Descending); sortCol5.Value = "false"; } else { GridView3.Sort("ExecutedDate", SortDirection.Ascending); sortCol5.Value = "true"; } } } protected void LinkButton23_Click(object sender, EventArgs e) { if (sortCol6 != null) { if (bool.Parse(sortCol6.Value)) { GridView3.Sort("Salvation", SortDirection.Descending); sortCol6.Value = "false"; } else { GridView3.Sort("Salvation", SortDirection.Ascending); sortCol6.Value = "true"; } } } protected void LinkButton24_Click(object sender, EventArgs e) { if (sortCol7 != null) { if (bool.Parse(sortCol7.Value)) { GridView3.Sort("LastPrice", SortDirection.Descending); sortCol7.Value = "false"; } else { GridView3.Sort("LastPrice", SortDirection.Ascending); sortCol7.Value = "true"; } } } }