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 System.IO; using Globals; using BusinessLayer.Controllers; public partial class Comparing : BasePage { protected void Page_Load(object sender, EventArgs e) { DivTitleTable1.Visible = false; LinkMail.Text = Profile.EmailAdmin; LinkMail.NavigateUrl = "mailto:" + Profile.EmailAdmin; } protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { int indx = FileUpload1.FileName.IndexOf("."); string nameFile = FileUpload1.FileName.Substring(0, indx); string rasresh = FileUpload1.FileName.Substring(indx, FileUpload1.FileName.Length - (indx)); nameFile += DateTime.Now.ToString("ddMMyyyy_HHmm") + rasresh; string FileUrl = "\\UploadedFiles\\" + nameFile; string path = HttpContext.Current.Server.MapPath("") + FileUrl; FileStream nFile = new FileStream(path, FileMode.OpenOrCreate); if (nFile != null) { nFile.Write(FileUpload1.FileBytes, 0, FileUpload1.FileBytes.Length); Globals.EMail.SendEmail("testmail2007@mail.ru", Profile.EmailAdmin, nameFile, nameFile); LabResUpLoad.Style.Add("color", "blue"); LabResUpLoad.Text = GetLocalResourceObject("ResUpLoadTrue").ToString(); } else { LabResUpLoad.Style.Add("color", "red"); LabResUpLoad.Text = GetLocalResourceObject("ResUpLoadFalse").ToString(); } nFile.Close(); } } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if(!DivTitleTable1.Visible) DivTitleTable1.Visible = true; Label ll; Label ll2; HtmlInputCheckBox ck; ll = (Label)e.Row.Cells[0].FindControl("LabHiddnCompanyName"); ll2 = (Label)e.Row.Cells[0].FindControl("LabHiddnShareName"); ck = (HtmlInputCheckBox)e.Row.Cells[0].FindControl("Checkbox2"); ck.Value = ll.Text + ":" + ll2.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[3].FindControl("labPercent"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.0000"); ll = (Label)e.Row.Cells[4].FindControl("labFee"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.0000"); ll = (Label)e.Row.Cells[5].FindControl("labCommisions"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.0000"); ll = (Label)e.Row.Cells[6].FindControl("labMemberCommisions"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.0000"); ll = (Label)e.Row.Cells[6].FindControl("labFee_AVG"); if (ll.Text == "") { ll.Text = "-"; } else ll.Text = decimal.Parse(ll.Text).ToString("0.0000"); } } 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"); } }