Ejemplo n.º 1
0
        private void AddCompany()
        {
            frmBusinessIndex frm = new frmBusinessIndex();

            frm.SelectedCountryIndex = SelectedCountryIndex;
            frm.CountryID            = Company_Info.CompanyCountryID.ToString();//CountryID;
            frm.ShowDialog();
            FillCompanies();
        }
Ejemplo n.º 2
0
        private void AddCompany()
        {
            frmBusinessIndex frm = new frmBusinessIndex();

            frm.parser               = parser;
            frm.Company_Info         = Company_Info;
            frm.CountryID            = CountryID;
            frm.SelectedCountryIndex = SelectedCountryIndex;
            frm.ShowDialog();
            dblayer.ReadBusinessList(lvwBusinessList, "", Company_Info);
        }
Ejemplo n.º 3
0
        private void UpdateCompany()
        {
            if (lvwBusinessList.SelectedIndices.Count == 1)
            {
                ListViewItem lvi = lvwBusinessList.Items[lvwBusinessList.SelectedIndices[0]];

                Company          company = (Company)lvi.Tag;
                frmBusinessIndex frm     = new frmBusinessIndex();
                frm.parser               = parser;
                frm.Company_Info         = Company_Info;
                frm.CountryID            = CountryID;
                frm.SelectedCountryIndex = SelectedCountryIndex;
                frm.edit_company         = company;
                frm.ShowDialog();
                company = dblayer.GetCompany(company.CountryID, company.CompanyVAT);
                lvi.Tag = company;
                lvi.SubItems[1].Text = company.CompanyName;
                lvi.SubItems[2].Text = company.CompanyVAT;
                lvi.SubItems[3].Text = company.WriteCode;
                lvi.SubItems[4].Text = CompanyType.types[company.CompanyType];
                lvi.SubItems[5].Text = company.AccountCode;

                switch (company.CompanyType)
                {
                case 0:
                    lvi.BackColor = Color.LightGreen;
                    break;

                case 1:
                    lvi.BackColor = Color.LightPink;
                    break;

                case 2:
                    lvi.BackColor = Color.LightSteelBlue;
                    break;

                default:
                    break;
                }
            }
        }