Esempio n. 1
0
        private void PublishInstallerButtonClick(object sender, EventArgs e)
        {
            try
            {
                var bytes = File.ReadAllBytes(".\\Source\\SchowcaseDisainerSetup.msi");

                var dachboardDataClasses = new DachboardDataClassesDataContext();
                var existInstaller       = dachboardDataClasses.DashboardStorages.Where(c => c.StorageType == 1);
                dachboardDataClasses.DashboardStorages.DeleteAllOnSubmit(existInstaller);
                dachboardDataClasses.SubmitChanges();

                var daschboard = new DashboardStorage
                {
                    Identifier      = "SchowcaseDisainerSetup",
                    Description     = "Дистрибутив дизайнера графических панелей",
                    DashboardBLOB   = bytes,
                    PublicationDate = DateTime.Now,
                    StorageType     = 1
                };
                dachboardDataClasses.DashboardStorages.InsertOnSubmit(daschboard);
                dachboardDataClasses.SubmitChanges();

                var msg = $"Дистрибутив дизайнера графических панелей успешно опубликован на сервере!";
                MessageBox.Show(msg, @"Публикация", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, @"Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
 partial void UpdateDashboardStorage(DashboardStorage instance);
Esempio n. 3
0
 partial void DeleteDashboardStorage(DashboardStorage instance);
Esempio n. 4
0
 partial void InsertDashboardStorage(DashboardStorage instance);