Пример #1
0
        private async void CreateDbDocument(object sender, RoutedEventArgs e)
        {
            draftDocRootElementOption.Match(async draftDocRootElement => {
                fileTreeRootElementOption.Match(async fileTreeRootElement => {
                    var pathOption = Optional.Return(FileDialog.Open(new CommonSaveFileDialog(), dbCommonFilter));

                    pathOption.Match(async value => {
                        var sqlProvider = new SqlDbProvider <PrefabDocumentModel>(value);

                        var models = await PrefabDocumentModel.CreateXmlToModel(draftDocRootElement, fileTreeRootElement);

                        sqlProvider.InitTable();

                        sqlProvider.Inserts(models);
                    },
                                     () => { });
                },
                                                () => {
                    MessageBox.Show(Properties.Resources.FileTreeXMLNotLoaded, Properties.Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
                });
            },
                                            () => {
                MessageBox.Show(Properties.Resources.DraftXMLNotLoaded, Properties.Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);
            });
        }
Пример #2
0
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
                DbProvider = new SqlDbProvider();

                OrderDAL orderDAL = new OrderDAL(DbProvider);
                orderDAL.DailyCheck();
                DbProvider.Dispose();
            }
            catch (Exception)
            {
                DbProvider.Dispose();
                Libs.WriteLog("Error", "ErrorToExec");
            }

            return(null);
        }
 public MarketDataSql(SqlDbProvider provider)
 {
     _provider = provider;
 }
Пример #4
0
 public ProvinceDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #5
0
 public CommentDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #6
0
 public UserDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #7
0
 public HotelDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #8
0
 public TagDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #9
0
 public BaseController()
 {
     DbProvider = new SqlDbProvider();
 }
Пример #10
0
 public FileUploadedDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #11
0
 public BaseDAL(SqlDbProvider dbProvider)
 {
     DbProvider = dbProvider;
 }
Пример #12
0
 public DistrictDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #13
0
 public HomeDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #14
0
 public RoleDAL(SqlDbProvider dbProvider) : base(dbProvider)
 {
 }
Пример #15
0
 public MarketDataSql(SqlDbProvider provider)
 {
     _provider = provider;
 }