Beispiel #1
0
 protected void txtEIdNo_TextChanged(object sender, EventArgs e)
 {
     try
     {
         string OCODE      = ((SessionUser)Session["SessionUser"]).OCode;
         string employeeID = Convert.ToString(txtEid_TRNS.Text);
         var    result     = objEmp_BLL.GetTerminateEmployeeList(employeeID, OCODE).ToList();
         if (result.Count > 0)
         {
             Emp_IMG_TRNS.ImageUrl = "EmployeeIMG.ashx?eId=" + employeeID + "&oCode=" + OCODE;
             var objNewEmp = result.First();
             txtEid_TRNS.Text     = Convert.ToString(objNewEmp.EID);
             txtEmpName_TRNS.Text = Convert.ToString(objNewEmp.EMP_FIRSTNAME + " " + objNewEmp.EMP_LASTNAME);
             txtDepartment.Text   = objNewEmp.DPT_NAME;
             txtDesignation.Text  = objNewEmp.DEG_NAME;
         }
         else
         {
             //NO RECORDS FOUND.
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
     }
 }