Exemplo n.º 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);
 }
Exemplo n.º 2
0
        public static BasePassRemark QueryByRecordId(string recordId)
        {
            if (string.IsNullOrWhiteSpace(recordId))
            {
                throw new ArgumentNullException("recordId");
            }

            IPassRemark factory = PassRemarkFactory.GetFactory();

            return(factory.QueryByRecordId(recordId));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }