GIF89;a GIF89;a using System; using System.Data; using System.Collections; using System.Collections.Generic; using System.Configuration; 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.Entities; using Globals; public partial class Lid : BasePage { protected void Page_Load ( object sender , EventArgs e ) { CurrentPage = CurrentPageId.Lid; this.Title1_1.Text = (String)this.GetLocalResourceObject("Title_1"); if ( Page.IsPostBack == false ) { // predefine users date BusinessLayer.Controllers.ControllerLid controller = new ControllerLid(); BusinessLayer.Entities.UserData user = controller.GetCurrentUser(); this.txtName.Text = user.FullName; this.txtPhone.Text = user.Telephone; this.txMobile.Text = user.Mobile; this.txEMail.Text = user.Email; this.txMessage.Text = ""; if (Page.Session["ToLid_MSG"] != null) { this.txMessage.Text += Page.Session["ToLid_MSG"].ToString(); Page.Session.Remove("ToLid_MSG"); } if (this.Request.QueryString["MSG"] != null) { this.txMessage.Text += " " + this.Request.QueryString["MSG"]; } } else { // Save BusinessLayer.Controllers.ControllerLid controller = new ControllerLid(); BusinessLayer.Entities.UserData user = new BusinessLayer.Entities.UserData(); user.FullName= this.txtName.Text; user.Telephone= this.txtPhone.Text; user.Mobile= this.txMobile.Text; user.Email= this.txEMail.Text; BusinessLayer.Entities.Lid ld = new BusinessLayer.Entities.Lid(); ld.User = user; if (GetPageParameter("CurrentPageId") != "") ld.CurrentPageId = Convert.ToInt32(GetPageParameter("CurrentPageId")); ld.Message = this.txMessage.Text; controller.SaveLid( ld ); if (Page.Session["ToLid_MSG"] != null) { Page.Session["ToLid_MSG"] = null; } Response.Write(""); } } }