diff --git a/HRM.BO/HREmployee/HREmployee.cs b/HRM.BO/HREmployee/HREmployee.cs index 8d70d3e..3dc58e1 100644 --- a/HRM.BO/HREmployee/HREmployee.cs +++ b/HRM.BO/HREmployee/HREmployee.cs @@ -1128,7 +1128,16 @@ namespace HRM.BO } #endregion + #region Property NomineeMobileNo : string + private string _nomineeMobileNo; + public string NomineeMobileNo + { + get { return _nomineeMobileNo; } + set { _nomineeMobileNo = value; } + } + + #endregion public EnumProfileStatus ProfileStatus { get; set; } public string NomineeStatus { get; set; } public bool HasPicture { get; set; } diff --git a/HRM.BO/SearchReport/SearchEmployee.cs b/HRM.BO/SearchReport/SearchEmployee.cs index 60294a5..713dc02 100644 --- a/HRM.BO/SearchReport/SearchEmployee.cs +++ b/HRM.BO/SearchReport/SearchEmployee.cs @@ -369,6 +369,7 @@ namespace HRM.BO List Find(SearchManager oManager); List FindCordinator(int? id, int? payrollTypeID); List FindEmpCodeName(int payrolltypeid, string code, string name); + List FindEmpCodeNameForEmployeePicker(int payrolltypeid, string code, string name); SearchEmployee get(int empid); List GetEmployeeNotYetUser(int payrollTypeID); List GetTeam(int employeeid); diff --git a/HRM.DA/DA/HREmployee/HREmployeeDA.cs b/HRM.DA/DA/HREmployee/HREmployeeDA.cs index aab7ee3..53c5f6c 100644 --- a/HRM.DA/DA/HREmployee/HREmployeeDA.cs +++ b/HRM.DA/DA/HREmployee/HREmployeeDA.cs @@ -676,16 +676,16 @@ namespace HRM.DA tc.ExecuteNonQuery("INSERT INTO EmpNominee(" + "EmployeeID, NomineeID, NominationPurposeID, NominationDate, Name, RelationID, " + " Percentage, BirthDate, OccupationID, Address, TelePhone," + - " EmailAddress)" + + " EmailAddress, NomineeMobileNo)" + " VALUES(" + " %n, %n, %n, %d, %s, %n," + - " %n, %d, %n, %s, %s, %s)", + " %n, %d, %n, %s, %s, %s, %s)", nominee.EmployeeID, nominee.ID, nominee.NominationPurposeID, DataReader.GetNullValue(nominee.NominationDate), nominee.Name, DataReader.GetNullValue(nominee.RelationID, 0), nominee.Percentage, DataReader.GetNullValue(nominee.BirthDate), DataReader.GetNullValue(nominee.OccupationID, 0), nominee.Address, nominee.TelePhone, - nominee.EmailAddress); + nominee.EmailAddress, nominee.NomineeMobileNo); } public static void Update(TransactionContext tc, EmpNominee nominee) @@ -700,8 +700,9 @@ namespace HRM.DA ,[ADDRESS] = %s ,[TELEPHONE] = %s ,[EMAILADDRESS] = %s + ,[NomineeMobileNo] = %s WHERE NOMINEEID = %n", nominee.ID, nominee.NominationPurposeID, nominee.Name, nominee.RelationID, - nominee.Percentage, nominee.OccupationID, nominee.Address, nominee.TelePhone, nominee.EmailAddress, + nominee.Percentage, nominee.OccupationID, nominee.Address, nominee.TelePhone, nominee.EmailAddress, nominee.NomineeMobileNo, nominee.ID); } @@ -943,6 +944,7 @@ namespace HRM.DA ,[PHOTOPATH] ,[TELEPHONE] ,[EMAILADDRESS] + ,[NomineeMobileNo] ,[SIGNATURE] ,[EMPLOYEEID] ,[NOMINEENAME] diff --git a/HRM.DA/DA/SearchReport/SearchEmployeeDA.cs b/HRM.DA/DA/SearchReport/SearchEmployeeDA.cs index d0347e3..a493351 100644 --- a/HRM.DA/DA/SearchReport/SearchEmployeeDA.cs +++ b/HRM.DA/DA/SearchReport/SearchEmployeeDA.cs @@ -231,6 +231,7 @@ END;"; { string orderby = "name"; string sqlClause = ""; + string top = ""; sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND Status = %n", payrollTypeID, EnumStatus.Active); if (code != string.Empty) { @@ -242,8 +243,41 @@ END;"; sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%")); return tc.ExecuteReader( - "Select EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s", - sqlClause, orderby); + "Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s", + top, sqlClause, orderby); + } + internal static IDataReader SearchForEmployeePicker(TransactionContext tc, int payrollTypeID, string code, string name) + { + string orderby = "name"; + string sqlClause = ""; + string top = ""; + //Previous Code For only Live Employee + //sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND Status = %n", payrollTypeID, EnumStatus.Active); + + //New Code For live And Waitiong for join Employee + sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND (Status = %n OR Status = %n)", payrollTypeID, EnumEmployeeStatus.Live, EnumEmployeeStatus.Waitingforjoin); + if (code != string.Empty) + { + //Previous with suggestion + //sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ("%" + code + "%")); + //orderby = "EmployeeNo"; + + //Using TOP + sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ( code + "%")); + orderby = "EmployeeNo"; + top = "TOP 50"; + + //Without suggestion + //sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo = %s", code ); + //orderby = "EmployeeNo"; + } + + if (name != string.Empty) + sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%")); + + return tc.ExecuteReader( + "Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s", + top, sqlClause, orderby); } #endregion diff --git a/HRM.DA/Service/HREmployee/HREmployeeService.cs b/HRM.DA/Service/HREmployee/HREmployeeService.cs index 42353fb..0194551 100644 --- a/HRM.DA/Service/HREmployee/HREmployeeService.cs +++ b/HRM.DA/Service/HREmployee/HREmployeeService.cs @@ -551,6 +551,7 @@ namespace HRM.DA oEmpNominee.TelePhone = oReader.GetString("TelePhone"); oEmpNominee.EmailAddress = oReader.GetString("EmailAddress"); + oEmpNominee.NomineeMobileNo = oReader.GetString("NomineeMobileNo", true, string.Empty); oEmpNominee.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus", true, 0); oEmpNominee.HasPicture = oReader.GetBoolean("HasPicture", true, false); oEmpNominee.HasSignature = oReader.GetBoolean("HasSignature", true, false); diff --git a/HRM.DA/Service/SearchReport/SearchEmployeeService.cs b/HRM.DA/Service/SearchReport/SearchEmployeeService.cs index cf8469d..256c69d 100644 --- a/HRM.DA/Service/SearchReport/SearchEmployeeService.cs +++ b/HRM.DA/Service/SearchReport/SearchEmployeeService.cs @@ -288,6 +288,43 @@ namespace HRM.DA return searchEmployees; } + public List FindEmpCodeNameForEmployeePicker(int payrollTypeID, string code, string name) + { + List searchEmployees = new List(); + + TransactionContext tc = null; + try + { + tc = TransactionContext.Begin(); + + DataReader dr = new DataReader(SearchEmployeeDA.SearchForEmployeePicker(tc, payrollTypeID, code, name)); + searchEmployees = this.CreateObjects(dr); + //while (dr.Read()) + //{ + // SearchEmployee item = new SearchEmployee(); + // item.Name = dr.GetString("name"); + // item.EmployeeNo = dr.GetString("employeeNo"); + + // searchEmployees.Add(item); + //} + dr.Close(); + tc.End(); + } + catch (Exception e) + { + #region Handle Exception + + if (tc != null) + tc.HandleError(); + ExceptionLog.Write(e); + + throw new ServiceException(e.Message, e); + + #endregion + } + + return searchEmployees; + } public List GetEmployeeNotYetUser(int payrollTypeID) diff --git a/HRM.Report/Class/rptBonus.cs b/HRM.Report/Class/rptBonus.cs index 55778cd..45a5132 100644 --- a/HRM.Report/Class/rptBonus.cs +++ b/HRM.Report/Class/rptBonus.cs @@ -276,7 +276,9 @@ namespace HRM.Report dSet.Tables.Add(dTable); //string RDLC = "Payroll.Report.RDLC.rptEmpDesignWiseProdBonus.rdlc"; + string RDLC = "rptEmpDesignWiseProdBonus.rdlc"; + //string RDLC = "rptEmpDesignWiseProdBonusOld.rdlc"; List _reportParameters = new List(); ReportParameter rParam = new ReportParameter("Month", dBonusMonth.ToString("MMM yyyy")); diff --git a/HRM.Report/HRM.Report.csproj b/HRM.Report/HRM.Report.csproj index b3b32b4..aae2aa0 100644 --- a/HRM.Report/HRM.Report.csproj +++ b/HRM.Report/HRM.Report.csproj @@ -235,6 +235,7 @@ + @@ -519,7 +520,12 @@ - + + PreserveNewest + + + PreserveNewest + diff --git a/HRM.Report/RDLC/rptEmpDesignWiseProdBonus.rdlc b/HRM.Report/RDLC/rptEmpDesignWiseProdBonus.rdlc index b643db6..7be97f2 100644 --- a/HRM.Report/RDLC/rptEmpDesignWiseProdBonus.rdlc +++ b/HRM.Report/RDLC/rptEmpDesignWiseProdBonus.rdlc @@ -162,7 +162,7 @@ - ="Department: " &Fields!Department.Value + ="Design No: " &Fields!DesignNo.Value + + + + + + + + + 0.59375in + + + 1.47708in + + + 1in + + + 0.80517in + + + 0.75in + + + 0.75in + + + 0.75in + + + 0.55429in + + + 0.51751in + + + 0.5022in + + + 0.46875in + + + + + 0.25in + + + + + true + true + + + + + Employee No + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Name + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Designation + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Design No + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Amount + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Start Date + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + End Date + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Working Hour + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Scheduled Hour + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Bonus Hour + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + OT Hour + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.16667in + + + + + true + true + + + + + =Fields!EmployeeNo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Name.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Designation.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!DesignNo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Amount.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!StartDate.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!EndDate.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =CDBL(Fields!WorkingHour.Value) + + + + + + + WorkingHour + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =CDBL(Fields!ScheduledHour.Value) + + + + + + + ScheduledHour + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =CDBL(Fields!BonusHour.Value) + + + + + + + OTHour + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =CDBL(Fields!OTHour.Value) + + + + + + + OTHour1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.25in + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(cdbl(Fields!Amount.Value)) + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + WhiteSmoke + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + + Detail + + + + + Detail_Collection + Output + true + + + Before + true + + + + PayrollDataSet_dtEmpDesWiseProdBonus + 0.5in + 0.66667in + 8.16875in + 1 + + + + + + + 1.7in + 0.25in + 6in + + + + External + ="file:///" & Parameters!Logo.Value + image/bmp + Fit + 0.725in + 1.7in + 1 + + + + + + + true + true + + + + + =Parameters!Address.Value + + + + + + + + + + + + + 0.025in + 6.775in + 0.2in + 1.35in + + + + true + true + + + + + ="Print Date & Time: " & Format(Today(), "dd MMM yyyy") + + + + + + + textbox18 + 0.025in + 4.89792in + 0.2in + 1.68542in + 1 + + + +