Example #1
0
    protected void btnsignin_Click(object sender, EventArgs e)
    {
        Session["uname"] = txtusername.Text;
        string pwd = txtpassword.Text;
        string uname = Session["uname"].ToString();

        Hashtable data = new Hashtable();
        data.Add("username", uname);
        data.Add("password", pwd);
        data.Add ("length",pwd .Length );

        Hashtable retval1=new Hashtable ();
        bll clloginfun = new bll();
        retval1  = clloginfun.sellogin(data);
        Session["empid"] = retval1["emp_id"].ToString();
        if (Convert.ToInt32(retval1["emp_id"]) != 0)
        {
            Hashtable data1 = new Hashtable();

            if (retval1["user"].ToString() == "employee")
            {
                bll selempdet = new bll();
                data1 = selempdet.selempdet(Convert.ToInt32(retval1["emp_id"]));

                Session["designation"] = data1["designation"].ToString();
                Session["department"] = data1["dept"].ToString();
                Session["empid"] = data1["empid"].ToString();

                if (retval1["securityques"].ToString() == "" & retval1["securityans"].ToString() == "")
                {

                    Response.Redirect("firsttimelogin.aspx");

                }
                else
                {

                    Response.Redirect("viewprofile.aspx");

                }
            }
            else
            {

                Response.Redirect("clienthome.aspx");

            }

        }
        else if (Convert.ToInt32(retval1["emp_id"]) == 0)
        {
            lblerrmsg.Visible = true;

        }
    }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int id = Convert.ToInt32(Session["id"]);
        Hashtable data = new Hashtable();

        bll selempdet = new bll();
        data = selempdet.selempdet(id);
        lblempid.Text = data["empid"].ToString();
        lblname.Text = data["name"].ToString();
        lbldob.Text = data["dob"].ToString();
        lbladdress.Text = data["adrs"].ToString();
        lblphoneno.Text = data["phoneno"].ToString();
        lblemailid.Text = data["emailid"].ToString();
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int id = Convert.ToInt32(Session["empid"]);
        Hashtable data = new Hashtable();

        bll selempdet = new bll();
        data = selempdet.selempdet(id);
        if (data["name"].ToString() == "")
        {
            Response.Redirect("CmsHome1.aspx");
        }
        lblempid .Text = data["empid"].ToString();
        lblname .Text = data["name"].ToString();
        lbldob .Text = data["dob"].ToString();
        lbladdress .Text = data["adrs"].ToString();
        lblphoneno.Text = data["phoneno"].ToString();
        lblemailid .Text = data["emailid"].ToString();
        lbldesg .Text = data["designation"].ToString();
        lbldept .Text = data["dept"].ToString();
        if (data["designation"].ToString() != "Head")
        {
            upshift.Visible = true;
             if ((data["headname"].ToString()) != "")
             {
            lblheadname.Text = data["headname"].ToString();
             }
             else
             {
                 lblheadname.Text = "No Head Assigned!";

             }
        }
            //{
            //    //cbheadname.SelectedItem.Text = data["headname"].ToString();
            //    cbheadname.SelectedValue.Replace(data["headname"].ToString(), data["headname"].ToString());

            //}

        else
        {
            uphead . Visible = true;
            //lbreportingemp .Text =
            //cbheadname.Enabled = false;

        }
    }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int id = Convert.ToInt32(Session["empid"]);
        Hashtable data = new Hashtable();

        bll selempdet = new bll();
        data = selempdet.selempdet(id);
        txtempid.Text = data["empid"].ToString();
        txtname.Text = data["name"].ToString();
        txtdob.Text = data["dob"].ToString();
        txtadrs.Text = data["adrs"].ToString();
        txtphoneno.Text = data["phoneno"].ToString();
        txtemailid.Text = data["emailid"].ToString();
        cbdesg.SelectedItem.Text = data["designation"].ToString();
        cbdep.SelectedItem.Text = data["dept"].ToString();
        if (data["designation"].ToString() != "Head")
        {
            if ((data["headname"].ToString()) != "")
            {
                //cbheadname.SelectedItem.Text = data["headname"].ToString();
                cbheadname.SelectedValue.Replace(data["headname"].ToString(), data["headname"].ToString());

            }
            else
            {
                cbheadname.SelectedValue = null;
            }

        }
        else
        {
            cbheadname.Enabled = false;

        }

        txtdesc.Text = data["desc"].ToString();

        TabContainer1.Visible = true;
        btnupd.Visible = true;
    }