Exemple #1
0
 public PageStorePrisguide(FormMain form, bool runInBackground, BackgroundWorker bw, System.Windows.Forms.WebBrowser webBrowser)
 {
     this.main = form;
     this.runningInBackground = runInBackground;
     this.worker = bw;
     this.browser = webBrowser;
 }
Exemple #2
0
 public FormSettings(FormMain form)
 {
     main = form;
     InitializeComponent();
     timerMsgClear.Tick += timer;
     Log.d("Innstillinger åpnet.");
 }
Exemple #3
0
        public RankingData(FormMain form, DateTime dtFraArg, DateTime dtTilArg, DateTime dtPickArg)
        {
            try
            {
                this.main = form;
                dtFra = dtFraArg;
                dtTil = dtTilArg;
                dtPick = dtPickArg;
                velgerPeriode = FormMain.datoPeriodeVelger;

                this.varekoderDataAlle = main.appConfig.varekoder.Where(item => item.kategori == "Nettbrett" || item.kategori == "Data").ToList();
                this.varekoderData = main.appConfig.varekoder.Where(item => item.kategori == "Data").ToList();
                this.varekoderNettbrett = main.appConfig.varekoder.Where(item => item.kategori == "Nettbrett").ToList();

                this.varekoderDataColumns = varekoderData.Where(p => p.synlig == true).DistinctBy(p => p.alias).ToList();
                this.varekoderNettbrettColumns = varekoderNettbrett.Where(p => p.synlig == true).DistinctBy(p => p.alias).ToList();

                // Sjekk om listen har provisjon
                int prov = varekoderDataAlle.Sum(x => Convert.ToInt32(x.provSelger));
                prov += varekoderDataAlle.Sum(x => Convert.ToInt32(x.provTekniker));
                if (prov != 0)
                    provisjon = true;
            }
            catch (Exception ex)
            {
                Log.Unhandled(ex);
            }
        }
Exemple #4
0
 public PageBudgetAllSales(FormMain form, bool runInBackground, BackgroundWorker bw, System.Windows.Forms.WebBrowser webBrowser)
 {
     main = form;
     runningInBackground = runInBackground;
     worker = bw;
     browser = webBrowser;
 }
Exemple #5
0
 public FormVarekoder(FormMain form)
 {
     this.main = form;
     InitializeComponent();
     BindVarekoder();
     timerMsgClear.Tick += timer;
     Log.d("Varekoder åpnet.");
 }
Exemple #6
0
        public TeleReport(FormMain form, int avdeling)
        {
            this.main = form;
            this.varekoderTele = main.appConfig.varekoder.Where(item => item.kategori == "Tele").ToList();
            //this.varekoderTeleColumns = varekoderTele.DistinctBy(p => p.synlig == true).ToList();

            this.varekoderTeleColumns = varekoderTele.Where(p => p.synlig == true).DistinctBy(p => p.alias).ToList();
        }
Exemple #7
0
        public FormKrav(FormMain form)
        {
            this.main = form;
            InitializeComponent();

            InitSelgerkoder();
            importSettings();
        }
Exemple #8
0
 public GraphClass(FormMain form)
 {
     this.main = form;
     if (main.appConfig.favVis)
         Favoritter = FormMain.Favoritter;
     else
         Favoritter = new List<string> { main.appConfig.Avdeling.ToString() };
 }
Exemple #9
0
 public FormSettingsMacro(FormMain form)
 {
     this.main = form;
     this.kgsaEmail = new KgsaEmail(main);
     InitializeComponent();
     timerMsgClear.Tick += timer;
     Log.d("Makro Innstillinger åpnet.");
 }
Exemple #10
0
 public FormProcessing(FormMain form)
 {
     InitializeComponent();
     this.main = form;
     this.Owner = main;
     timer = new Timer();
     timer.Interval = 1500;
     timer.Tick += new EventHandler(timer_Close);
 }
Exemple #11
0
 public FormSendEmail(FormMain form)
 {
     this.main = form;
     InitializeComponent();
     comboBoxGruppe.SelectedIndex = 1;
     comboBoxType.SelectedIndex = 0;
     textBoxTitle.Text = main.appConfig.epostEmne;
     textBoxContent.Focus();
 }
Exemple #12
0
 public FormVinnprodukt(FormMain form)
 {
     this.main = form;
     InitializeComponent();
     UpdateGrid();
     toolStripComboBoxFilterKat.SelectedIndex = 0;
     timerMsgClear.Tick += timer;
     Log.d("Vinnprodukter åpnet.");
 }
Exemple #13
0
        public DataReport(FormMain form, int avdeling)
        {
            this.main = form;
            this.varekoderDataAlle = main.appConfig.varekoder.Where(item => item.kategori == "Nettbrett" || item.kategori == "Data").ToList();
            this.varekoderData = main.appConfig.varekoder.Where(item => item.kategori == "Data").ToList();
            this.varekoderNettbrett = main.appConfig.varekoder.Where(item => item.kategori == "Nettbrett").ToList();

            this.varekoderDataColumns = varekoderData.Where(p => p.synlig == true).DistinctBy(p => p.alias).ToList();
            this.varekoderNettbrettColumns = varekoderNettbrett.Where(p => p.synlig == true).DistinctBy(p => p.alias).ToList();
        }
Exemple #14
0
 public GraphClass(FormMain form, DateTime dtFraArg, DateTime dtTilArg)
 {
     this.main = form;
     dtFra = dtFraArg;
     dtTil = dtTilArg;
     if (main.appConfig.favVis)
         Favoritter = FormMain.Favoritter;
     else
         Favoritter = new List<string> { main.appConfig.Avdeling.ToString() };
 }
Exemple #15
0
 public SalesCodes(FormMain form, bool preload = false)
 {
     this.main = form;
     if (preload)
     {
         BackgroundWorker bwLoad = new BackgroundWorker();
         bwLoad.DoWork += new DoWorkEventHandler(bwLoad_DoWork);
         bwLoad.WorkerSupportsCancellation = true;
         bwLoad.RunWorkerAsync();
     }
 }
Exemple #16
0
 public TopGraph(FormMain form)
 {
     this.main = form;
     datoFra = main.appConfig.dbTo.AddMonths(-1);
     dato = main.appConfig.dbTo;
     dager = (dato - datoFra).Days;
     dataButikk = GetHistTable();
     dataData = GetHistTable();
     dataAudioVideo = GetHistTable();
     dataTele = GetHistTable();
 }
Exemple #17
0
        public RankingButikk(FormMain form, DateTime dtFraArg, DateTime dtTilArg, DateTime dtPickArg)
        {
            this.main = form;
            dtFra = dtFraArg;
            dtTil = dtTilArg;
            dtPick = dtPickArg;
            velgerPeriode = FormMain.datoPeriodeVelger;

            this.varekoderAlle = main.appConfig.varekoder.ToList();
            this.varekoderAlleAlias = varekoderAlle.Where(item => item.synlig == true).Select(x => x.alias).Distinct();
        }
Exemple #18
0
        public RankingOversikt(FormMain form, DateTime dtFraArg, DateTime dtTilArg)
        {
            this.main = form;
            dtFra = dtFraArg;
            dtTil = dtTilArg;
            velgerPeriode = FormMain.datoPeriodeVelger;

            this.varekoderAlle = main.appConfig.varekoder.ToList();
            this.varekoderAlleAlias = varekoderAlle.Where(item => item.synlig == true).Select(x => x.alias).Distinct();

            dtDetaljer = MakeTableOversikt(false, false, false, false);
        }
Exemple #19
0
        public RankingToppselgere(FormMain form, DateTime dtFraArg, DateTime dtTilArg)
        {
            this.main = form;
            dtFra = dtFraArg;
            dtTil = dtTilArg;
            velgerPeriode = FormMain.datoPeriodeVelger;

            if (FormMain.selgerkodeList != null)
                if (FormMain.selgerkodeList.Count == 0)
                    FormMain.selgerkodeList.AddRange(main.salesCodes.GetAlleSelgerkoder(main.appConfig.Avdeling));

            this.varekoderAlle = main.appConfig.varekoder.ToList();
            this.varekoderAlleAlias = varekoderAlle.Where(item => item.synlig == true).Select(x => x.alias).Distinct();
        }
Exemple #20
0
 public RankingStore(FormMain form, DateTime dtFraArg, DateTime dtTilArg, DateTime dtPickArg, Obsolete ob)
 {
     try
     {
         this.main = form;
         this.obsolete = ob;
         this.dtFra = dtFraArg;
         this.dtTil = dtTilArg;
         this.dtPick = dtPickArg;
     }
     catch (Exception ex)
     {
         Log.Unhandled(ex);
     }
 }
Exemple #21
0
        public RankingVinn(FormMain form, DateTime dtFraArg, DateTime dtTilArg, DateTime dtPickArg)
        {
            this.main = form;
            dtFra = dtFraArg;
            dtTil = dtTilArg;
            dtPick = dtPickArg;
            velgerPeriode = FormMain.datoPeriodeVelger;

            if (main.appConfig.vinnDatoFraTil)
                tableVinn = MakeTableVinn("fratil");
            else
                tableVinn = MakeTableVinn("måned");

            if (!velgerPeriode)
                AddLastOpenDay();
        }
Exemple #22
0
        public RankingAudioVideo(FormMain form, DateTime dtFraArg, DateTime dtTilArg, DateTime dtPickArg)
        {
            this.main = form;
            dtFra = dtFraArg;
            dtTil = dtTilArg;
            dtPick = dtPickArg;
            velgerPeriode = FormMain.datoPeriodeVelger;

            this.varekoderAudioVideo = main.appConfig.varekoder.Where(item => item.kategori == "AudioVideo").ToList();
            this.varekoderAudioVideoColumns = varekoderAudioVideo.Where(p => p.synlig == true).DistinctBy(p => p.alias).ToList();

            // Sjekk om listen har provisjon
            int prov = varekoderAudioVideo.Sum(x => Convert.ToInt32(x.provSelger));
            prov += varekoderAudioVideo.Sum(x => Convert.ToInt32(x.provTekniker));
            if (prov != 0)
                provisjon = true;
        }
Exemple #23
0
        public RankingKnowHow(FormMain form, DateTime dtFraArg, DateTime dtTilArg, DateTime dtPickArg)
        {
            try
            {
                this.main = form;
                dtFra = dtFraArg;
                dtTil = dtTilArg;
                dtPick = dtPickArg;
                velgerPeriode = FormMain.datoPeriodeVelger;

                this.varekoderAlle = main.appConfig.varekoder.ToList();
                this.varekoderColumns = varekoderAlle.Where(p => p.synlig == true).DistinctBy(p => p.alias).ToList();
            }
            catch (Exception ex)
            {
                Log.Unhandled(ex);
            }
        }
Exemple #24
0
        public FormMacro(FormMain form, DateTime dateArg, string programArg, int macroAttemptArg, bool argIgnoreExtraWait, BackgroundWorker bwArg)
        {
            this.main = form;
            main.tableMacroQuick = getTable();
            this.bwMaster = bwArg;
            this.Dato = dateArg;
            this.macroAttempt = macroAttemptArg;
            this.ignoreExtraWait = argIgnoreExtraWait;

            errorCode = 0;
            errorMessage = "";

            try
            {
                string input = File.ReadAllText(programArg);
                program = new List<string>(input.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries));
                FilterProgram();
            }
            catch (Exception ex)
            {
                Error(6, "Feil under lasting av makro program.", ex);
            }

            InitializeComponent();
            if (main.appConfig.macroShowWarning)
                panelWarning.Visible = true;
            else
                this.Height = 95;

            tm = new Timer();
            tm.Interval = 2 * 1000;
            tm.Tick += new EventHandler(tm_Tick);

            bwMacro.DoWork += new DoWorkEventHandler(bwMacro_DoWork);
            bwMacro.ProgressChanged += new ProgressChangedEventHandler(bwMacro_ProgressChanged);
            bwMacro.WorkerReportsProgress = true;
            bwMacro.WorkerSupportsCancellation = true;
            bwMacro.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwMacro_RunWorkerCompleted);
            bwMacro.RunWorkerAsync();
        }
Exemple #25
0
        public FormBudgetCreation(FormMain form)
        {
            this.main = form;
            InitializeComponent();
            ImportSettings();
            dateTimePicker_Date.Format = DateTimePickerFormat.Custom;
            dateTimePicker_Date.CustomFormat = "MMMM yyyy";
            dateTimePicker_Date.Value = FormMain.GetLastDayOfMonth(main.appConfig.dbTo);
            comboBox_Acc.SelectedIndex = 0;
            comboBox_Finans.SelectedIndex = 0;
            comboBox_Kategori.SelectedIndex = 0;
            comboBox_Rtgsa.SelectedIndex = 0;
            comboBox_Strom.SelectedIndex = 0;
            comboBox_TA.SelectedIndex = 0;
            comboBox_Vinn.SelectedIndex = 0;
            budget = new BudgetObj(main);
            UpdateDb();
            if (dataGridView1.RowCount != 0)
                tabControl1.SelectedTab = tabPageSettings;

            Random rnd = new Random();
            labelTips.Text = tips[rnd.Next(tips.Length)];
        }
Exemple #26
0
 public TableVareinfo(FormMain form)
 {
     this.main = form;
 }
Exemple #27
0
 public TableWeekly(FormMain form)
 {
     this.main = form;
 }
Exemple #28
0
 public ButikkReport(FormMain form, int avdeling)
 {
     this.main = form;
     this.varekoderAlle = main.appConfig.varekoder.ToList();
     this.varekoderAlleAlias = varekoderAlle.Where(item => item.synlig == true).Select(x => x.alias).Distinct();
 }
Exemple #29
0
 public KgsaEmail(FormMain form)
 {
     this.main = form;
     LoadEmailDb();
 }
Exemple #30
0
 public TableServiceLogg(FormMain form)
 {
     this.main = form;
 }