Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     int count = Session.Count;
     if (!IsPostBack)
     {
         _user = (TMSLibrary.User)Session["userInfo"];
         getUserInfo();
     }
 }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["userInfo"] != null)
                {
                    _user = (TMSLibrary.User)Session["userInfo"];
                    txtNickName.Value = _user.UserName;
                }

            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Cookies["Tid"] != null)
            {
                TId = Request.Cookies["Tid"].Values.ToString();

                PostId = Session["postid"].ToString();
                _user = (TMSLibrary.User)Session["userinfo"];
                lblTo.Text = "Transporter ID : " + TId + " Post ID : " + PostId;
                Request.Cookies["Tid"].Values.Clear();
            }
        }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["userinfo"] != null)
     {
         _user = (TMSLibrary.User)Session["userinfo"];
         fillgrdPost();
     }
     else
     {
         Response.Redirect("~\\Account\\Login");
     }
     MakeGridResponsible();
 }
Ejemplo n.º 5
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            TMSLibrary.User _user = new TMSLibrary.User();
            _user = TMSLibrary.UserMethods.UserLogin(txtUsername.Text.Trim(), txtPassword.Text.Trim());

            if (_user.UserId != 0 || txtUsername.Text == "Team")
            {
                Session["userInfo"] = _user;
                if (_user.Status == 0 && txtUsername.Text != "Team")
                {
                    Response.Redirect("~\\Account\\UserVarification");
                }
                else
                {
                    //TMSLibrary.Mail.SendEmail("*****@*****.**", "Hello Vaibhav, That's a test mail by Laxyo Solution Soft Pvt. Ltd.", "Test Mail");
                    if (chkRemember.Checked)
                    {
                        Response.Cookies["lsspl_1"].Expires = DateTime.Now.AddDays(30);
                        Response.Cookies["lsspl_2"].Expires = DateTime.Now.AddDays(30);
                        Response.Cookies["lsspl_1"].Value = txtUsername.Text.Trim();
                        Response.Cookies["lsspl_2"].Value = txtPassword.Text.Trim();
                    }

                    if (_user.UserType == Convert.ToInt32(TMSLibrary.CONSTANT.ApplicationUserType.Customer))
                    {

                        Response.Redirect("~\\Customer\\Dashboard.aspx");
                    }
                    else if (_user.UserType == Convert.ToInt32(TMSLibrary.CONSTANT.ApplicationUserType.Transporter))
                    {
                        Response.Redirect("~\\Transporter\\TransporterDashboard.aspx");
                    }
                    else if (txtUsername.Text == "Team" && txtPassword.Text == "Team")
                    {
                        Session["userInfo"] = null;
                        Response.Redirect("~\\Team\\AllBooking.aspx");
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('Please Enter Correct UserName and Password');", true);

                    }
                }

            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('Please Enter Correct UserName and Password');", true);

            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["userInfo"] != null)
                {
                    _user = (TMSLibrary.User)Session["userInfo"];
                    GetUserInfo();

                }
                else
                {
                    Response.Redirect("~\\Account\\Login");
                }
            }
        }
Ejemplo n.º 7
0
        protected void linkmyaccount_Click1(object sender, EventArgs e)
        {
            if (Session["userInfo"] != null)
            {
                _user = (TMSLibrary.User)Session["userInfo"];

                if (_user.UserId != 0)
                {
                    if (_user.UserType == (int)TMSLibrary.CONSTANT.ApplicationUserType.Transporter)
                    {
                        Response.Redirect("~\\Transporter\\TransportDetails");
                    }
                    else
                    {
                        Response.Redirect("~\\Customer\\AddPost");
                    }

                }
            }
            else
            {
                Server.Transfer("~\\Account\\Login");
            }
        }
Ejemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _user = (TMSLibrary.User)Session["userInfo"];
     FillGridRecentPost();
 }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userInfo"] != null)
            {
                _user = (TMSLibrary.User)Session["userInfo"];
                if (!IsPostBack)
                {
                    Fillddl();
                    FillgrdPost();
                    makeGridResponsible();
                }
                else
                {
                    System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "AutoFill()", true);
                   // System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "GridResponsive()", true);
                    //System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "DatePicker()", true);
                }

            }
            else
            {
                Response.Redirect("~\\Account\\Login");
            }
        }