public ToUserFromStoreViewModel()
        {
            StoreBll           = new StoreBll();
            CompanyBll         = new CompanyBll();
            LocationBll        = new LocationBll();
            OperationBll       = new OperationBll();
            ToUserFromStore    = new ToUserFromStoreModel();
            Company            = new ObservableCollection <CompanyModel>();
            Location           = new ObservableCollection <LocationModel>();
            SearchCommand      = new RelayCommand <string>(OnSearch);
            SubmitCommand      = new RelayCommand(OnSubmit);
            OperationTypeEnums = new OperationTypeEnums();
            StatusEnums        = new StatusEnums();

            BindData();
        }
Пример #2
0
 public bool WriteLog(string userNperation, OperationTypeEnums type)
 {
     using (var db = DbFactory.Open())
     {
         var logInfo   = new LogInfo();
         var operation = new operateLog();
         operation.operateMsg  = userNperation;
         operation.operateTime = DateTime.Now;
         operation.userName    = UserName;
         logInfo.adcd          = adcd;
         logInfo.OperationType = type;
         logInfo.UserName      = UserName;
         logInfo.tm            = DateTime.Now;
         logInfo.RealName      = RealName;
         logInfo.Operation     = JsonTools.ObjectToJson(operation);
         return(db.Insert <LogInfo>(logInfo) == 1);
     }
 }
Пример #3
0
        // Constructor
        public ChangeUserViewModel()
        {
            CompanyBll   = new CompanyBll();
            LocationBll  = new LocationBll();
            OperationBll = new OperationBll();

            Company  = new ObservableCollection <CompanyModel>();
            Location = new ObservableCollection <LocationModel>();

            SearchCommand = new RelayCommand <string>(OnSearch);
            SubmitCommand = new RelayCommand(OnSubmit);
            CleanCommand  = new RelayCommand(onClean);

            OperationTypeEnums = new OperationTypeEnums();
            StatusEnums        = new StatusEnums();

            BindData();
        }