Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["tid"]))
                {
                    Guid teamid = Guid.Parse(Request.QueryString["tid"]);
                    TeamRepository teamRepo = new TeamRepository();
                    Team team = teamRepo.getTeamById(teamid);
                    txtFirstName.Text = team.FirstName;
                    txtLastName.Text = team.LastName;
                    txtEmail.Text = team.EmailId;
                    txtEmail.Enabled = false;

                }
            }
            SocioBoard.Helper.SessionFactory.configfilepath = Server.MapPath("~/hibernate.cfg.xml");
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (!string.IsNullOrEmpty(Request.QueryString["tid"]))
                    {
                        Guid teamid = Guid.Parse(Request.QueryString["tid"]);
                        TeamRepository teamRepo = new TeamRepository();
                        Team team = teamRepo.getTeamById(teamid);
                        txtFirstName.Text = team.FirstName;
                        txtLastName.Text = team.LastName;
                        txtEmail.Text = team.EmailId;
                        txtEmail.Enabled = false;

                    }
                    if (!string.IsNullOrEmpty(Request.QueryString["type"]))
                    {
                        //DropDownList1.SelectedItem.Text = Request.QueryString["type"].ToString();

                        DropDownList1.SelectedValue = Request.QueryString["type"].ToString();
                    }
                }

                //if (!string.IsNullOrEmpty(Request.QueryString["type"]))
                //{
                //    //DropDownList1.SelectedItem.Text = Request.QueryString["type"].ToString();

                //    DropDownList1.SelectedValue = Request.QueryString["type"].ToString();
                //}

                SocioBoard.Helper.SessionFactory.configfilepath = Server.MapPath("~/hibernate.cfg.xml");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                logger.Error("Error : " + ex.Message);
                logger.Error("Error : " + ex.StackTrace);
            }
        }