Example #1
0
 public static IPassRemark GetFactory()
 {
     if (factory == null)
     {
         Type type = Type.GetType("Common." + SystemDefaultConfig.DatabaseProvider + "Repository.PassRemarkDAL,Common." + SystemDefaultConfig.DatabaseProvider + "Repository", true);
         factory = (IPassRemark)Activator.CreateInstance(type);
     }
     return(factory);
 }
Example #2
0
        public static BasePassRemark QueryByRecordId(string recordId)
        {
            if (string.IsNullOrWhiteSpace(recordId))
            {
                throw new ArgumentNullException("recordId");
            }

            IPassRemark factory = PassRemarkFactory.GetFactory();

            return(factory.QueryByRecordId(recordId));
        }
Example #3
0
        public static List <BasePassRemark> QueryByParkingId(string parkingId, PassRemarkType?passType)
        {
            if (string.IsNullOrWhiteSpace(parkingId))
            {
                throw new ArgumentNullException("parkingId");
            }

            IPassRemark factory = PassRemarkFactory.GetFactory();

            return(factory.QueryByParkingId(parkingId, passType));
        }
Example #4
0
        public static bool Delete(string recordId)
        {
            if (string.IsNullOrWhiteSpace(recordId))
            {
                throw new ArgumentNullException("recordId");
            }

            IPassRemark factory = PassRemarkFactory.GetFactory();
            bool        result  = factory.Delete(recordId);

            if (result)
            {
                OperateLogServices.AddOperateLog(OperateType.Delete, string.Format("recordId:{0}", recordId));
            }
            return(result);
        }
Example #5
0
        public static bool Update(BasePassRemark model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            IPassRemark factory = PassRemarkFactory.GetFactory();
            bool        result  = factory.Update(model);

            if (result)
            {
                OperateLogServices.AddOperateLog <BasePassRemark>(model, OperateType.Update);
            }
            return(result);
        }
Example #6
0
        public static bool Add(BasePassRemark model)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            model.RecordID = GuidGenerator.GetGuidString();
            IPassRemark factory = PassRemarkFactory.GetFactory();
            bool        result  = factory.Add(model);

            if (result)
            {
                OperateLogServices.AddOperateLog <BasePassRemark>(model, OperateType.Add);
            }
            return(result);
        }