Ejemplo n.º 1
0
        protected void btnFindSupervisor_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                TextBox empCodeTextBox = (TextBox)ctrlEmpSearch2.FindControl("txtSearch");
                string  EmpCode        = empCodeTextBox.Text;

                CustomList <HRM_Emp>        EmpList = _salaryManager.doSearch(EmpCode);
                Dictionary <string, string> columns = new Dictionary <string, string>();

                columns.Add("EmpCode", "Employee Code");
                columns.Add("EmpName", "Employee Name");
                columns.Add("StaffCategory", "Staff Category");
                columns.Add("Designation", "Designation");
                columns.Add("Department", "Department");
                columns.Add("JobLocation", "Job Location");

                StaticInfo.SearchItem(EmpList, "Emp Info", "SearchSupervisor", SearchColumnConfig.GetColumnConfig(typeof(HRM_Emp), columns), 700, GlobalEnums.enumSearchType.StoredProcedured);
            }
            catch (SqlException ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getSqlExceptionMessage(ex));
            }
            catch (Exception ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
            }
        }
        protected void btnFind_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                StringBuilder sb = new StringBuilder();
                if (ddlCompany.SelectedValue != "")
                {
                    sb.Append("@OrgKey=");
                    sb.Append(ddlCompany.SelectedValue.ToInt());
                    sb.Append(",");
                }
                if (ddlBranch.SelectedValue != "")
                {
                    sb.Append("@BranchKey=");
                    sb.Append(ddlBranch.SelectedValue.ToInt());
                    sb.Append(",");
                }
                if (ddlDepartment.SelectedValue != "")
                {
                    sb.Append("@DepartmentKey=");
                    sb.Append(ddlDepartment.SelectedValue.ToInt());
                    sb.Append(",");
                }
                if (ddlGrade.SelectedValue != "")
                {
                    sb.Append("@GradeKey=");
                    sb.Append(ddlGrade.SelectedValue.ToInt());
                    sb.Append(",");
                }
                if (ddlDesignation.SelectedValue != "")
                {
                    sb.Append("@DesigKey=");
                    sb.Append(ddlDesignation.SelectedValue.ToInt());
                    sb.Append(",");
                }
                string EmpKey = "";
                Session[StaticInfo.SearchArg] = sb;
                CustomList <HRM_Emp>        ProcessedAndUnProcessedList = _manager.doSearch(EmpKey);
                Dictionary <string, string> columns = new Dictionary <string, string>();

                columns.Add("EmpCode", "Employee Code");
                columns.Add("EmpName", "Employee Name");

                StaticInfo.SearchItem(ProcessedAndUnProcessedList, "Emp Info", "SearchEmployee", SearchColumnConfig.GetColumnConfig(typeof(HRM_Emp), columns), 500, GlobalEnums.enumSearchType.StoredProcedured);
                //StaticInfo.SearchItem(items, "Emp Info", "SearchEmployee", SearchColumnConfig.GetColumnConfig(typeof(HRM_Emp), columns), 500);
            }
            catch (SqlException ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getSqlExceptionMessage(ex));
            }
            catch (Exception ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
            }
        }
Ejemplo n.º 3
0
        protected void btnFind_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                StringBuilder sb = new StringBuilder();
                Session[StaticInfo.SearchArg] = sb;

                string empKey = Request.QueryString.Get("EmpKey");
                CustomList <HRM_Emp> ProcessedAndUnProcessedList = new CustomList <HRM_Emp>();
                if (empKey.IsNullOrEmpty())
                {
                    ProcessedAndUnProcessedList = _salaryManager.doSearch(empKey);
                }
                else
                {
                    ProcessedAndUnProcessedList = _empManager.GetReportees(Convert.ToInt64(empKey));
                }
                Dictionary <string, string> columns = new Dictionary <string, string>();

                columns.Add("EmpCode", "Employee Code");
                columns.Add("EmpName", "Employee Name");
                columns.Add("Staff Category", "Staff Category");
                columns.Add("Designation", "Designation");
                columns.Add("Department", "Department");
                columns.Add("JobLocation", "Job Location");
                //columns.Add("LOB","LOB");
                columns.Add("SupervisorName", "SupervisorName");
                columns.Add("EmpStatus", "EmpStatus");

                StaticInfo.SearchItem(ProcessedAndUnProcessedList, "Emp Info", "SearchEmployee", SearchColumnConfig.GetColumnConfig(typeof(HRM_Emp), columns), 750, GlobalEnums.enumSearchType.StoredProcedured);
                //StaticInfo.SearchItem(items, "Emp Info", "SearchEmployee", SearchColumnConfig.GetColumnConfig(typeof(HRM_Emp), columns), 500);
            }
            catch (SqlException ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getSqlExceptionMessage(ex));
            }
            catch (Exception ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
            }
        }
Ejemplo n.º 4
0
        protected void btnFindSupervisor_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                string EmployeeCode = ((TextBox)this.Header1.FindControl("txtSearch")).Text.ToString();
                CustomList <HRM_Emp>        EmpList = _salaryManager.doSearch(EmployeeCode);
                Dictionary <string, string> columns = new Dictionary <string, string>();

                columns.Add("EmpCode", "Employee Code");
                columns.Add("EmpName", "Employee Name");

                StaticInfo.SearchItem(EmpList, "Emp Info", "SearchSupervisor", SearchColumnConfig.GetColumnConfig(typeof(HRM_Emp), columns), 500, GlobalEnums.enumSearchType.StoredProcedured);
            }
            catch (SqlException ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getSqlExceptionMessage(ex));
            }
            catch (Exception ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
            }
        }