Exemplo n.º 1
0
        private void MainCmpSelector_Load(object sender, EventArgs e)
        {
            QueryCommands qc = new QueryCommands();

            resultList = cmp.GetAllMainCmpInfoSortByName();

            if (resultList.Count != 0)
            {
                for (int i = 0; i < resultList.Count; i++)
                {
                    comboBox1.Items.Add(resultList[i].Name);
                }
            }
            Program.LoadStop();
            this.BringToFront();
            this.Focus();
        }
Exemplo n.º 2
0
        private void CompanyInfo_Load(object sender, EventArgs e)
        {
            comboBox1.Text    = Properties.Settings.Default.CmpName;
            CmpAddressTB.Text = Properties.Settings.Default.CmpAddress;
            CmpOIBTB.Text     = Properties.Settings.Default.CmpVAT;
            CmpWWWTB.Text     = Properties.Settings.Default.CmpWWW;
            CmpPhoneTB.Text   = Properties.Settings.Default.CmpPhone;
            CmpEmail.Text     = Properties.Settings.Default.CmpEmail;
            SupportEmail.Text = Properties.Settings.Default.SupportEmail;

            CmpIBAN.Text  = Properties.Settings.Default.CmpIBAN;
            CmpSwift.Text = Properties.Settings.Default.CmpSWIFT;
            CmpMB.Text    = Properties.Settings.Default.CmpMB;


            CmpCityTB.Text    = Properties.Settings.Default.CmpCity;
            CmpPBTB.Text      = Properties.Settings.Default.CmpPB;
            CmpContactTB.Text = Properties.Settings.Default.CmpContact;
            CmpKNTB.Text      = Properties.Settings.Default.CmpKN.ToString();
            CmpEURTB.Text     = Properties.Settings.Default.CmpEUR.ToString();
            cmpCode.Text      = Properties.Settings.Default.CmpCode;
            CmpCountryTB.Text = Properties.Settings.Default.CmpCountry;

            LogoSize.Value = Properties.Settings.Default.LogoSize;

            try
            {
                CLogo logoImage = new CLogo();
                img = logoImage.GetImage();
                pictureBox1.Image = img;

                cnt = qc.CountMainCmp();
                if (cnt != 0)
                {
                    label8.Text = "Last Code - " + cnt;
                }
                else
                {
                    label8.Text = "Last Code - " + cnt;
                }

                MainCmp temCmp = new MainCmp();
                cmpList    = temCmp.GetAllMainCmpInfoSortByName();
                regionsArr = qc.GetAllRegions();
                if (cmpList.Count != 0)
                {
                    for (int i = 0; i < temCmp.Count; i++)
                    {
                        this.comboBox1.Items.Add(cmpList[i].Name);
                    }
                }
                regionsArr = qc.GetAllRegions();

                if (regionsArr.Count != 0)
                {
                    for (int i = 0; i < regionsArr.Count; i = i + 3)
                    {
                        if (long.Parse(regionsArr[i]) > 3)
                        {
                            this.comboBox2.Items.Add(regionsArr[i]);
                        }
                    }
                }

                comboBox2.Text = Properties.Settings.Default.CmpRegionID.ToString();

                this.Focus();
            }
            catch (Exception e1)
            {
                Program.LoadStop();
                this.Focus();

                new LogWriter(e1);
            }
            Program.LoadStop();
            this.Focus();
        }