Example #1
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        ATTUserLogin user;

        try
        {
            //user = BLLUserLogin.GetUserLogin(this.txtUsername_Rqd.Text, this.txtpassword_Rqd.Text, 3);//PMS
            user = BLLUserLogin.GetUserLogin(this.txtUsername_Rqd.Text, this.txtpassword_Rqd.Text, 4);//OAS
            //user = BLLUserLogin.GetUserLogin(this.txtUsername_Rqd.Text, this.txtpassword_Rqd.Text, 2);//LJMS
            //user = BLLUserLogin.GetUserLogin(this.txtUsername_Rqd.Text, this.txtpassword_Rqd.Text, 10);//DLPDS
        }
        catch (Exception ex)
        {
            this.lblStatus.Text = ex.Message; //"Please try again..";
            return;
        }

        if (user.UserMessage.ToUpper() != "OK")
        {
            Session["Login_User_Detail"] = null;
            this.lblStatus.Text          = user.UserMessage;
            this.txtUsername_Rqd.Focus();
            return;
        }
        user.UserName = this.txtUsername_Rqd.Text.Trim();
        //user.OrgID = int.Parse(this.ddlOrg.SelectedValue);
        //user.OrgName = this.ddlOrg.SelectedItem.Text;
        Session["Login_User_Detail"] = user;
        Response.Redirect("~/MODULES/Default.aspx", true);
    }
Example #2
0
    protected void Application_Click(object sender, ImageClickEventArgs e)
    {
        ImageButton imgBut = (ImageButton)sender;

        int    applID = int.Parse(imgBut.CommandArgument);
        string applName;

        switch (applID)
        {
        case 1:
            applName = "CMS";
            break;

        case 2:
            applName = "LJMS";
            break;

        case 3:
            applName = "PMS";
            break;

        case 4:
            applName = "LIS";
            break;

        case 5:
            applName = "OAS";
            break;

        case 6:
            applName = "PMES";
            break;

        case 7:
            applName = "OSS";
            break;

        case 9:
            applName = "PDIS";
            break;

        case 10:
            applName = "DLPDS";
            break;

        default:
            applName = "";
            break;
        }

        ATTUserLogin user = (ATTUserLogin)Session["Login_User_Detail"];

        try
        {
            user.MenuList = BLLUserLogin.GetUserApplicationMenu(user.UserName, applID);
        }
        catch (Exception ex)
        {
            throw ex;
        }
        Response.Redirect("~/MODULES/" + applName + "/Default.aspx", true);
    }