using System; using System.Collections.Generic; using System.Linq; using System.Text; using Ease.Core; using System.Data; namespace HRM.BO { [Serializable] public class BadliDailyRecruit : BasicBaseObject { #region Constructor public BadliDailyRecruit() { _employeeID = 0; _departmentID = 0; _shiftID = 0; _accessCardNo = string.Empty; _recommendedBy = string.Empty; _entryDate = DateTime.MinValue; _inTime = DateTime.MinValue; _isPaid = false; _isPaymentCompleted = false; _oTHours = 0; _changedOTHours = 0; _oTRemarks = string.Empty; _benefitRemarks = string.Empty; _workDayType = EnumWorkPlanDayType.WorkingDay; _paymentCode = string.Empty; } #endregion #region Properties #region AccessCardNo : string private string _accessCardNo; public string AccessCardNo { get { return _accessCardNo; } set { //base.OnPropertyChange("AccessCardNo", _accessCardNo, value); _accessCardNo = value; } } #endregion #region RecommendedBy : string private string _recommendedBy; public string RecommendedBy { get { return _recommendedBy; } set { //base.OnPropertyChange("RecommendedBy", _recommendedBy, value); _recommendedBy = value; } } #endregion #region EmployeeID : ID private int _employeeID; public int EmployeeID { get { return _employeeID; } set { //base.OnPropertyChange("EmployeeID", _employeeID, value); _employeeID = value; } } #endregion #region DepartmentID : ID private int _departmentID; public int DepartmentID { get { return _departmentID; } set { //base.OnPropertyChange("DepartmentID", _departmentID, value); _departmentID = value; } } #endregion #region ShiftID : ID private int _shiftID; public int ShiftID { get { return _shiftID; } set { //base.OnPropertyChange("ShiftID", _shiftID, value); _shiftID = value; } } #endregion #region ShiftID : ID private int _workPlanGroupID; public int WorkPlanGroupID { get { return _workPlanGroupID; } set { //base.OnPropertyChange("WorkPlanGroupID", _workPlanGroupID, value); _workPlanGroupID = value; } } #endregion #region OTHours : double private double _oTHours; public double OTHours { get { return _oTHours; } set { //base.OnPropertyChange("OTHours", _oTHours, value); _oTHours = value; } } #endregion #region ChangedOTHours : double private double _changedOTHours; public double ChangedOTHours { get { return _changedOTHours; } set { //base.OnPropertyChange("ChangedOTHours", _changedOTHours, value); _changedOTHours = value; } } #endregion #region OTRemarks : string private string _oTRemarks; public string OTRemarks { get { return _oTRemarks; } set { //base.OnPropertyChange("OTRemarks", _oTRemarks, value); _oTRemarks = value; } } #endregion #region PaymentCode : string private string _paymentCode; public string PaymentCode { get { return _paymentCode; } set { //base.OnPropertyChange("PaymentCode", _paymentCode, value); _paymentCode = value; } } #endregion #region BenefitRemarks : string private string _benefitRemarks; public string BenefitRemarks { get { return _benefitRemarks; } set { //base.OnPropertyChange("BenefitRemarks", _benefitRemarks, value); _benefitRemarks = value; } } #endregion #region IsPaid : bool private bool _isPaid; public bool IsPaid { get { return _isPaid; } set { //base.OnPropertyChange("IsPaid", _isPaid, value); _isPaid = value; } } #endregion #region IsPaymentCompleted : bool private bool _isPaymentCompleted; public bool IsPaymentCompleted { get { return _isPaymentCompleted; } set { //base.OnPropertyChange("IsPaymentCompleted", _isPaymentCompleted, value); _isPaymentCompleted = value; } } #endregion #region InTime : DateTime private DateTime _inTime; public DateTime InTime { get { return _inTime; } set { //base.OnPropertyChange("InTime", _inTime, value); _inTime = value; } } #endregion #region OutTime : DateTime private DateTime _outTime; public DateTime OutTime { get { return _outTime; } set { //base.OnPropertyChange("OutTime", _outTime, value); _outTime = value; } } #endregion #region EntryDate : DateTime private DateTime _entryDate; public DateTime EntryDate { get { return _entryDate; } set { //base.OnPropertyChange("EntryDate", _entryDate, value); _entryDate = value; } } #endregion #region Status : EnumBadliStatus private EnumBadliStatus _status; public EnumBadliStatus Status { get { return _status; } set { //base.OnPropertyChange("Status", (short)_status, (short)value); _status = value; } } #endregion #region Status : EnumWorkDayType private EnumWorkPlanDayType _workDayType; public EnumWorkPlanDayType WorkDayType { get { return _workDayType; } set { //base.OnPropertyChange("WorkDayType", (short)_workDayType, (short)value); _workDayType = value; } } #endregion #endregion //#region Service Factory IBadliDailyRecruitService : IAccessCardService //internal static IBadliDailyRecruitService Service //{ // get { return Services.Factory.CreateService(typeof(IBadliDailyRecruitService)); } //} //#endregion //#region Functions //public static BadliDailyRecruit Get(ID employeeID, DateTime entryDate, EnumBadliStatus status) //{ // BadliDailyRecruit oBadliDailyRecruit = null; // #region Cache Header // oBadliDailyRecruit = (BadliDailyRecruit)_cache["Get", employeeID]; // if (oBadliDailyRecruit != null) // return oBadliDailyRecruit; // #endregion // oBadliDailyRecruit = BadliDailyRecruit.Service.Get(employeeID, entryDate, status); // #region Cache Footer // _cache.Add(oBadliDailyRecruit, "Get", employeeID); // #endregion // return oBadliDailyRecruit; //} //public static ObjectsTemplate Get() //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.Get(); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate GetByShift(ID ShiftID) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.GetByShift(ShiftID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate GetByDepartment(ID DeptID) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.GetByDepartment(DeptID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate GetByDepartment(string DeptName, DateTime entryDate) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.GetByDepartment(DeptName, entryDate); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate Get(DateTime fromDate, DateTime toDate) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.Get(fromDate, toDate); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate Get(string empIds, DateTime fromDate, DateTime toDate) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.Get(empIds, fromDate, toDate); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate Get(DateTime fromDate, DateTime toDate, ID departmentID, ID shiftID, ID relayID, EnumBadliStatus badliStatus, bool hasStatus) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.Get(fromDate, toDate, departmentID, shiftID, relayID, badliStatus, hasStatus); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate Get(DateTime fromDate, DateTime toDate, ID departmentID, ID shiftID, ID relayID) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.Get(fromDate, toDate, departmentID, shiftID, relayID); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate Get(DateTime entryDate) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.Get(entryDate); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate GetAllUnAssignedFrom(DateTime FromDate) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["GetAllUnAssignedFrom"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.GetAllUnAssignedFrom(FromDate); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "GetAllUnAssignedFrom"); // #endregion // return oBadliDailyRecruits; //} //public static ObjectsTemplate Get(string empIds, DateTime entryDate) //{ // #region Cache Header // ObjectsTemplate oBadliDailyRecruits = _cache["Get"] as ObjectsTemplate; // if (oBadliDailyRecruits != null) // return oBadliDailyRecruits; // #endregion // try // { // oBadliDailyRecruits = Service.Get(empIds, entryDate); // } // catch (ServiceException e) // { // throw new Exception(e.Message, e); // } // #region Cache Footer // _cache.Add(oBadliDailyRecruits, "Get"); // #endregion // return oBadliDailyRecruits; //} //public static DataSet GetBadliDepartmentWiseWorkDay(string Ids, DateTime fromDate, DateTime toDate) //{ // DataSet ds = null; // try // { // ds = Service.GetBadliDepartmentWiseWorkDay(Ids, fromDate, toDate); // } // catch (Exception e) // { // throw new Exception(e.Message, e); // } // return ds; //} //public static DataSet GetAllBadliLineManager() //{ // DataSet ds = null; // try // { // ds = Service.GetAllBadliLineManager(); // } // catch (Exception e) // { // throw new Exception(e.Message, e); // } // return ds; //} //public void Save(ObjectsTemplate oBadliDailyRecruits) //{ // oBadliDailyRecruits.ForEach(x => x.SetAuditTrailProperties()); // BadliDailyRecruit.Service.Save(oBadliDailyRecruits); //} //public void UndoDepart(ObjectsTemplate oBadliDailyRecruits) //{ // oBadliDailyRecruits.ForEach(x => x.SetAuditTrailProperties()); // BadliDailyRecruit.Service.UndoDepart(oBadliDailyRecruits); //} //public void Delete() //{ // BadliDailyRecruit.Service.Delete(ID); //} //#endregion } //#region IBadliDailyRecruit Service //public interface IBadliDailyRecruitService //{ // BadliDailyRecruit Get(ID employeeID, DateTime entryDate, EnumBadliStatus status); // ObjectsTemplate Get(); // ObjectsTemplate GetAllUnAssignedFrom(DateTime toDate); // DataSet GetAllBadliLineManager(); // ObjectsTemplate GetByShift(ID ShiftID); // ObjectsTemplate GetByDepartment(ID DeptID); // ObjectsTemplate Get(DateTime fromDate, DateTime toDate); // ObjectsTemplate Get(string EmpIds, DateTime fromDate, DateTime toDate); // ObjectsTemplate GetByDepartment(string DeptName, DateTime entryDate); // void UndoDepart(ObjectsTemplate oBadliDailyRecruits); // void Save(ObjectsTemplate oBadliDailyRecruits); // ObjectsTemplate Get(DateTime entryDate); // ObjectsTemplate Get(string empIds, DateTime entryDate); // DataSet GetBadliDepartmentWiseWorkDay(string Ids, DateTime fromDate, DateTime toDate); // ObjectsTemplate Get(DateTime fromDate, DateTime toDate, ID departmentID, ID shiftID, ID relayID); // ObjectsTemplate Get(DateTime fromDate, DateTime toDate, ID departmentID, ID shiftID, ID relayID, EnumBadliStatus badliStatus, bool hasStatus); // void Delete(ID id); //} //#endregion }