예제 #1
0
        public void Insert(HPS.BLL.CardCheckingLogBLL.BLLCardCheckingLog_T businessObject)
        {
            try
            {
                if (businessObject.IsValid(Hepsa.Core.Validation.ValidationExceptionType.Except, "UniqueCardCheckingLogID_int") == false)
                {
                    throw new Hepsa.Core.Validation.InvalidBusinessObjectException(businessObject.BrokenRulesList().ToString());
                }

                _dataObject.Insert(businessObject);
            }
            catch (System.Exception ex)
            {
                throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this);
            }
        }
예제 #2
0
        public void Update(HPS.BLL.CardCheckingLogBLL.BLLCardCheckingLog_T businessObject, HPS.BLL.CardCheckingLogBLL.BLLCardCheckingLog_TKeys businessObjectKey)
        {
            try
            {
                List <string> ExceptList = new List <string>();
                if (businessObject.CardCheckingLogID_int == businessObjectKey.CardCheckingLogID_int)
                {
                    ExceptList.Add("UniqueCardCheckingLogID_int");
                }
                if (businessObject.IsValid(Hepsa.Core.Validation.ValidationExceptionType.Except, ExceptList.ToArray()) == false)
                {
                    throw new Hepsa.Core.Validation.InvalidBusinessObjectException(businessObject.BrokenRulesList().ToString());
                }

                _dataObject.Update(businessObject, businessObjectKey);
            }
            catch (System.Exception ex)
            {
                throw Hepsa.Core.Exception.HandleException.ChangeExceptionLanguage(ex, this);
            }
        }