示例#1
0
 private void GetEmployeeInformation(string employeeId)
 {
     try
     {
         EMPOYEE_BLL     employeeBll = new EMPOYEE_BLL();
         string          OCODE       = ((SessionUser)Session["SessionUser"]).OCode;
         string          eid         = employeeId;
         List <AssignTo> assignTos   = new List <AssignTo>();
         assignTos = employeeBll.GetDesgination(eid, OCODE).ToList();
         foreach (AssignTo assign in assignTos)
         {
             lblApplicantId.Text          = employeeId.ToString();
             lblApplicantDesignation.Text = assign.DeginationName.ToString();
             lblApplicantDepartment.Text  = assign.DepartmentName.ToString();
             List <HRM_PersonalInformations> personanlInfo = employeeBll.getEmpployeeNameById(eid, OCODE);
             foreach (HRM_PersonalInformations aperson in personanlInfo)
             {
                 lblApplicantName.Text = aperson.FirstName + " " + aperson.LastName;
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
        private void getApplicantInfo()
        {
            try
            {
                string eid = ((SessionUser)Session["SessionUser"]).EID;
                if (eid != null)
                {
                    EMPOYEE_BLL employeeBll = new EMPOYEE_BLL();
                    string      OCODE       = ((SessionUser)Session["SessionUser"]).OCode;
                    //int eid = Convert.ToInt16(ddlReportingTo.SelectedValue);

                    List <AssignTo> assignTos = new List <AssignTo>();
                    assignTos = employeeBll.GetDesgination(eid, OCODE).ToList();
                    foreach (AssignTo assign in assignTos)
                    {
                        lblApplicantId.Text          = ((SessionUser)Session["SessionUser"]).EID;
                        lblApplicantDesignation.Text = assign.DeginationName.ToString();
                        lblApplicantDepartment.Text  = assign.DepartmentName.ToString();
                    }
                    List <HRM_PersonalInformations> personanlInfo = employeeBll.getEmpployeeNameById(eid, OCODE);
                    foreach (HRM_PersonalInformations aperson in personanlInfo)
                    {
                        lblApplicantName.Text = aperson.FirstName + " " + aperson.LastName;
                        //hidReportingBossID.Value = aperson.ReportingBossId.ToString();
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        private void getApplicantInfo()
        {
            try
            {
                string eid = ((SessionUser)Session["SessionUser"]).EID;
                if (eid != null)
                {
                    EMPOYEE_BLL employeeBll = new EMPOYEE_BLL();
                    string      OCODE       = ((SessionUser)Session["SessionUser"]).OCode;
                    //int eid = Convert.ToInt16(ddlReportingTo.SelectedValue);

                    List <AssignTo> assignTos = new List <AssignTo>();
                    assignTos = employeeBll.GetDesgination(eid, OCODE).ToList();
                    foreach (AssignTo assign in assignTos)
                    {
                        lblApplicantId.Text          = ((SessionUser)Session["SessionUser"]).EID;
                        lblApplicantDesignation.Text = assign.DeginationName.ToString();
                        lblApplicantDepartment.Text  = assign.DepartmentName.ToString();
                    }
                    List <HRM_PersonalInformations> personanlInfo1 = employeeBll.getEmpployeeNameById(eid, OCODE);
                    foreach (HRM_PersonalInformations aperson in personanlInfo1)
                    {
                        lblApplicantName.Text = aperson.FirstName + " " + aperson.LastName;
                        //hidReportingBossID.Value = aperson.ReportingBossId.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
            }
        }
示例#4
0
        //private void gethrmemployeeList()
        //{
        //    try
        //    {
        //        string OCODE = ((SessionUser)Session["SessionUser"]).OCode;
        //        List<ReportingBoss> personalInfos = objEmp_BLL.GetPersonalInfoByDepartment(OCODE);
        //        if (personalInfos.Count > 0)
        //        {
        //            //drpdwnApproveSupervisor.DataSource = personalInfos;
        //            //drpdwnApproveSupervisor.DataTextField = "FulllName";
        //            //drpdwnApproveSupervisor.DataValueField = "EID";
        //            //drpdwnApproveSupervisor.DataBind();
        //            //drpdwnApproveSupervisor.Items.Insert(0, new ListItem("--Select--", "0"));



        //            //drpApprovedAdmin.DataSource = personalInfos;
        //            //drpApprovedAdmin.DataTextField = "FulllName";
        //            //drpApprovedAdmin.DataValueField = "EID";
        //            //drpApprovedAdmin.DataBind();
        //            //drpApprovedAdmin.Items.Insert(0, new ListItem("--Select--", "0"));


        //            drpApprovedHR.DataSource = personalInfos;
        //            drpApprovedHR.DataTextField = "FulllName";
        //            drpApprovedHR.DataValueField = "EID";
        //            drpApprovedHR.DataBind();
        //            drpApprovedHR.Items.Insert(0, new ListItem("--Select--", "0"));



        //        }


        //    }
        //    catch (Exception)
        //    {

        //        throw;
        //    }


        //}

        private void getApplicantInfo()
        {
            try
            {
                string eid = ((SessionUser)Session["SessionUser"]).EID;

                if (eid != null)
                {
                    EMPOYEE_BLL employeeBll = new EMPOYEE_BLL();
                    string      OCODE       = ((SessionUser)Session["SessionUser"]).OCode;
                    //int eid = Convert.ToInt16(ddlReportingTo.SelectedValue);

                    List <AssignTo> assignTos = new List <AssignTo>();
                    assignTos = employeeBll.GetDesgination(eid, OCODE).ToList();
                    foreach (AssignTo assign in assignTos)
                    {
                        txtEid_TRNS.Text    = ((SessionUser)Session["SessionUser"]).EID;
                        txtDesignation.Text = assign.DeginationName.ToString();
                        txtDepartment.Text  = assign.DepartmentName.ToString();
                        string employeeID = Convert.ToString(txtEid_TRNS.Text);
                        Emp_IMG_TR.Visible  = true;
                        Emp_IMG_TR.ImageUrl = "EmployeeIMG.ashx?eId=" + eid + "&oCode=" + OCODE;
                    }
                    List <HRM_PersonalInformations> personanlInfo = employeeBll.getEmpployeeNameById(eid, OCODE);
                    foreach (HRM_PersonalInformations aperson in personanlInfo)
                    {
                        txtEmpName_TRNS.Text = aperson.FirstName + " " + aperson.LastName;
                        //hidReportingBossID.Value = aperson.ReportingBossId.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#5
0
        private void getLeaveTypes()
        {
            try
            {
                int CL  = 0;
                int SL  = 0;
                int AL  = 0;
                int ML  = 0;
                int LWP = 0;

                string OCODE = ((SessionUser)Session["SessionUser"]).OCode;

                var row = objLeave_BLL.GetAllLeaveType(OCODE).ToList();

                if (row.Count > 0)
                {
                    foreach (var item in row)
                    {
                        if (item.LEV_TYPE == "AL")
                        {
                            AL = Convert.ToInt16(item.LEV_DAYS);
                        }
                        else if (item.LEV_TYPE == "CL")
                        {
                            CL = Convert.ToInt16(item.LEV_DAYS);
                        }
                        else if (item.LEV_TYPE == "SL")
                        {
                            SL = Convert.ToInt16(item.LEV_DAYS);
                        }
                        else if (item.LEV_TYPE == "MATL")
                        {
                            ML = Convert.ToInt16(item.LEV_DAYS);
                        }
                        else if (item.LEV_TYPE == "LWP")
                        {
                            LWP = Convert.ToInt16(item.LEV_DAYS);
                        }
                    }

                    string eid = txtEid_TRNS.Text;

                    List <HRM_PersonalInformations> personanlInfo = objEmp_BLL.getEmpployeeNameById(eid, OCODE);
                    var empInfo = personanlInfo.First();

                    DateTime joning_date  = Convert.ToDateTime(empInfo.JoiningDate);
                    int      joining_year = joning_date.Year;

                    int current_year = DateTime.Now.Year;

                    DateTime firstDay  = new DateTime(current_year, 1, 1);
                    DateTime lastDay   = new DateTime(current_year, 12, 31);
                    double   dayOfYear = (lastDay - firstDay).TotalDays + 1;

                    if (joining_year == current_year)
                    {
                        double empDay   = (lastDay - joning_date).TotalDays + 1;
                        double cl_total = (CL * empDay) / dayOfYear;

                        lblCl.Text = Math.Round(cl_total).ToString();

                        double empDaySL = (lastDay - joning_date).TotalDays + 1;
                        double sl_total = (SL * empDaySL) / dayOfYear;

                        lblSl.Text = Math.Round(sl_total).ToString();
                    }
                    else
                    {
                        lblCl.Text = CL.ToString();
                        lblSl.Text = SL.ToString();
                    }


                    lblAL.Text = AL.ToString();
                    lblML.Text = ML.ToString();
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true);
            }
        }