Ejemplo n.º 1
0
 protected override void Validation()
 {
     if (_LeaveRequestTypeDal.GetLeaveRequestTypeByName(_LeaveRequestType.Name) != null)
     {
         HrmisUtility.ThrowException(HrmisUtility._LeaveRequestType_Name_Repeat);
     }
 }
        protected override void Validation()
        {
            if (_LeaveRequestTypeDal.GetLeaveRequestTypeByPkid(_LeaveRequestType.LeaveRequestTypeID) == null)
            {
                HrmisUtility.ThrowException(HrmisUtility._LeaveRequestType_Name_NotExist);
            }
            LeaveRequestType leaveRequestType = _LeaveRequestTypeDal.GetLeaveRequestTypeByName(_LeaveRequestType.Name);

            if (leaveRequestType != null && leaveRequestType.LeaveRequestTypeID != _LeaveRequestType.LeaveRequestTypeID)
            {
                HrmisUtility.ThrowException(HrmisUtility._LeaveRequestType_Name_Repeat);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public LeaveRequestType GetLeaveRequestTypeByName(string name)
 {
     return(_LeaveRequestTypeDal.GetLeaveRequestTypeByName(name));
 }