67 lines
2.9 KiB
C#
67 lines
2.9 KiB
C#
|
using HRM.BO;
|
|||
|
using Ease.Core.DataAccess;
|
|||
|
using System;
|
|||
|
using System.Data;
|
|||
|
|
|||
|
|
|||
|
namespace HRM.DA
|
|||
|
{
|
|||
|
public class MarketSalarySurveyDA
|
|||
|
{
|
|||
|
internal static IDataReader Get(TransactionContext tc, int nID)
|
|||
|
{
|
|||
|
throw new NotImplementedException();
|
|||
|
}
|
|||
|
|
|||
|
internal static IDataReader Get(TransactionContext tc, DateTime surveyYear)
|
|||
|
{
|
|||
|
return tc.ExecuteReader("Select * from MarketSalarySurvey where SurveyYear between %d AND %d",
|
|||
|
Ease.Core.Utility.Global.DateFunctions.FirstDateOfYear(surveyYear),
|
|||
|
Ease.Core.Utility.Global.DateFunctions.LastDateOfYear(surveyYear));
|
|||
|
}
|
|||
|
|
|||
|
internal static IDataReader Get(TransactionContext tc, DateTime surveyYear, int nSurveyOn, int nGradeID)
|
|||
|
{
|
|||
|
return tc.ExecuteReader(
|
|||
|
"Select * from MarketSalarySurvey where SurveyYear between %d AND %d AND GradeID=%n AND SurveyOn=%n",
|
|||
|
Ease.Core.Utility.Global.DateFunctions.FirstDateOfYear(surveyYear),
|
|||
|
Ease.Core.Utility.Global.DateFunctions.LastDateOfYear(surveyYear), nGradeID, nSurveyOn);
|
|||
|
}
|
|||
|
|
|||
|
internal static IDataReader Get(TransactionContext tc, DateTime surveyYear, int nSurveyOn)
|
|||
|
{
|
|||
|
return tc.ExecuteReader(
|
|||
|
"Select * from MarketSalarySurvey where SurveyYear between %d AND %d AND SurveyOn=%n",
|
|||
|
Ease.Core.Utility.Global.DateFunctions.FirstDateOfYear(surveyYear),
|
|||
|
Ease.Core.Utility.Global.DateFunctions.LastDateOfYear(surveyYear), nSurveyOn);
|
|||
|
}
|
|||
|
|
|||
|
internal static void Insert(TransactionContext tc, MarketSalarySurvey item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery(
|
|||
|
"Insert into MarketSalarySurvey(MarketSurveyID,GradeID,Amount,SurveyYear,SurveyOn,CompanyID) Values(%n,%n,%n,%d,%n,%n)",
|
|||
|
item.ID, item.GradeID, item.Amount, item.SurveyYear, Convert.ToInt32(item.SurveyOn), item.CompanyID);
|
|||
|
}
|
|||
|
|
|||
|
internal static void Update(TransactionContext tc, MarketSalarySurvey item)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery(
|
|||
|
"Update MarketSalarySurvey Set GradeID = %n, Amount = %n, SurveyYear = %d, SurveyOn = %n,CompanyID=%n Where MarketSurveyID = %n",
|
|||
|
item.GradeID, item.Amount, item.SurveyYear, Convert.ToInt32(item.SurveyOn), item.CompanyID, item.ID);
|
|||
|
}
|
|||
|
|
|||
|
internal static void Delete(TransactionContext tc, int id)
|
|||
|
{
|
|||
|
tc.ExecuteNonQuery("Delete From MarketSalarySurvey where MarketSurveyID = %n", id);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
internal static DataSet CheckDesignationExistsOrNot(TransactionContext tc, int iD, DateTime year)
|
|||
|
{
|
|||
|
return tc.ExecuteDataSet(
|
|||
|
"Select * From MarketSalarySurvey Where GradeID = %n And SurveyYear between %d AND %d ", iD,
|
|||
|
Ease.Core.Utility.Global.DateFunctions.FirstDateOfYear(year),
|
|||
|
Ease.Core.Utility.Global.DateFunctions.LastDateOfYear(year));
|
|||
|
}
|
|||
|
}
|
|||
|
}
|