Пример #1
0
    protected void cmdSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            DataSet objDs = _objBALUser.GetUserMasterForLogin(txtLoginId.Text.Trim(), txtPassword.Text.Trim());
            if (objDs.Tables[0].Rows.Count > 0)
            {
                Session["loginuser"]      = objDs.Tables[0].Rows[0]["loginusername"].ToString();
                Session["loginId"]        = objDs.Tables[0].Rows[0]["UserLoginId"].ToString();
                Session["ukzn_staff"]     = objDs.Tables[0].Rows[0]["staffno"].ToString();
                Session["role_id"]        = objDs.Tables[0].Rows[0]["UserRole"].ToString();
                Session["logo"]           = objDs.Tables[0].Rows[0]["CompanyLoogo"].ToString();
                Session["commlogo"]       = objDs.Tables[0].Rows[0]["communicationlogo"].ToString();
                Session["CompanyId"]      = objDs.Tables[0].Rows[0]["UserCompany"].ToString();
                Session["BranchId"]       = objDs.Tables[0].Rows[0]["BranchId"].ToString();
                Session["CompanyAddress"] = objDs.Tables[0].Rows[0]["CompanyAddress"].ToString();
                Session["agentname"]      = objDs.Tables[0].Rows[0]["agentname"].ToString().ToUpper();
                Session["TicketConsId"]   = objDs.Tables[0].Rows[0]["TicketConsId"].ToString().ToUpper();
                //Session["BudgetOfTravellers"] = objDs.Tables[0].Rows[0]["BudgetOfTravellers"].ToString().ToUpper();
                Session["EmpCategory"] = objDs.Tables[0].Rows[0]["empcategory"].ToString().ToUpper();
                Session["UserEmail"]   = objDs.Tables[0].Rows[0]["UserEmail"].ToString().ToUpper();
                Session["UserPhone"]   = objDs.Tables[0].Rows[0]["UserPhone"].ToString().ToUpper();

                Response.Redirect("SalesAdmin/Index.aspx");
            }
            else
            {
                lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "Info ", "Invalid username/password.");
            }
        }
        catch (Exception ex)
        {
            lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "Error", ex.Message);
        }
    }