当前位置: 首页>>代码示例>>C#>>正文


C# Customer.ShowDialog方法代码示例

本文整理汇总了C#中Customer.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# Customer.ShowDialog方法的具体用法?C# Customer.ShowDialog怎么用?C# Customer.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Customer的用法示例。


在下文中一共展示了Customer.ShowDialog方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: cmdEdytuj_Click

        private void cmdEdytuj_Click(object sender, EventArgs e)
        {
            Klient customer;

            try { customer = (Klient)dgwCustomers.CurrentRow.DataBoundItem; }
            catch { return; }

            Customer newCustomer = new Customer(Customer.TYPE.EDIT);

            newCustomer.FIRMA = customer.FIRMA;
            newCustomer.IMIE = customer.IMIE;
            newCustomer.NAZWISKO = customer.NAZWISKO;
            newCustomer.ADRES = customer.ADRES;
            newCustomer.NIP = customer.NIP;
            newCustomer.PESEL = customer.PESEL;
            newCustomer.BANK = customer.BANK;
            newCustomer.TELEFON = customer.TELEFON;

            newCustomer.ShowDialog();

            if (newCustomer.CANCEL) return;

            Klient client = new Klient();

            CustomerDatabase.UpdateCustomer(customer.ID, newCustomer.FIRMA, newCustomer.IMIE, newCustomer.NAZWISKO,
                    newCustomer.ADRES,
                    newCustomer.NIP, newCustomer.PESEL, newCustomer.BANK,newCustomer.TELEFON);

            LoadCustomers(-1, newCustomer.FIRMA, newCustomer.IMIE, newCustomer.NAZWISKO, newCustomer.NIP, newCustomer.PESEL,
                newCustomer.BANK);

            Message.InfoMessage("Kontrahent został zapisany");
        }
开发者ID:pawlo57,项目名称:Warsztat,代码行数:33,代码来源:Customers.cs

示例2: cmdSzukaj_Click

        private void cmdSzukaj_Click(object sender, EventArgs e)
        {
            Customer customer = new Customer(Customer.TYPE.FIND);

            customer.ShowDialog();

            if (customer.CANCEL) return;

            LoadCustomers(-1, customer.FIRMA, customer.IMIE, customer.NAZWISKO, customer.NIP, customer.PESEL, customer.BANK);
        }
开发者ID:pawlo57,项目名称:Warsztat,代码行数:10,代码来源:Customers.cs

示例3: cmdNowy_Click

        private void cmdNowy_Click(object sender, EventArgs e)
        {
            Customer newCustomer = new Customer(Customer.TYPE.NEW);

            newCustomer.ShowDialog();

            if (newCustomer.CANCEL) return;

            int Result = CustomerDatabase.NewCustomer(newCustomer.FIRMA, newCustomer.IMIE, newCustomer.NAZWISKO,
                newCustomer.ADRES, newCustomer.NIP, newCustomer.PESEL, newCustomer.BANK,newCustomer.TELEFON);

            if (Result < 0) { Message.ErrorDatabase(); return; }

            LoadCustomers(-1, newCustomer.FIRMA, newCustomer.IMIE, newCustomer.NAZWISKO, newCustomer.NIP,
                newCustomer.PESEL, newCustomer.BANK);

            Message.InfoMessage("Nowy kontrahent został dodany");
        }
开发者ID:pawlo57,项目名称:Warsztat,代码行数:18,代码来源:Customers.cs

示例4: cmdKontrahent_Click

        private void cmdKontrahent_Click(object sender, EventArgs e)
        {
            Customer selectCustomer = new Customer(Customer.TYPE.FIND);

            selectCustomer.ShowDialog();

            if (selectCustomer.CANCEL) return;

            List<Klient> klienci = CustomerDatabase.GetCustomers(-1, selectCustomer.FIRMA,
                selectCustomer.IMIE, selectCustomer.NAZWISKO, selectCustomer.NIP,
                selectCustomer.PESEL, selectCustomer.BANK);

            if (klienci == null) { Message.NotFound(); return; }

            cbxKontrahent.ValueMember = "";
            cbxKontrahent.DisplayMember = "";
            cbxKontrahent.DataSource = null;
            CID = -1;

            cbxKontrahent.DataSource = klienci;
            cbxKontrahent.DisplayMember = "LISTA";
            cbxKontrahent.ValueMember = "ID";

            cbxKontrahent.Text = "Wybierz z listy";

            Settings.ShowDropDownList(ref cbxKontrahent);
        }
开发者ID:pawlo57,项目名称:Warsztat,代码行数:27,代码来源:CarsFrm.cs

示例5: cmdKontrahentDodaj_Click

        private void cmdKontrahentDodaj_Click(object sender, EventArgs e)
        {
            Customer newCustomer = new Customer(Customer.TYPE.NEW);

            newCustomer.ShowDialog();

            if (newCustomer.CANCEL) return;

            CID = CustomerDatabase.NewCustomer(newCustomer.FIRMA, newCustomer.IMIE, newCustomer.NAZWISKO, newCustomer.ADRES,
                    newCustomer.NIP, newCustomer.PESEL, newCustomer.BANK, newCustomer.TELEFON);

            if (CID < 0) { Message.ErrorDatabase(); return; }

            cbxKontrahent.DisplayMember = "";
            cbxKontrahent.ValueMember = "";
            cbxKontrahent.DataSource = null;

            cbxKontrahent.Text = newCustomer.FIRMA + ", " + newCustomer.NAZWISKO + " " +
                newCustomer.IMIE + ", " + newCustomer.ADRES;

            //FIRMA = newCustomer.FIRMA;
            //ADRES = newCustomer.ADRES;
            //NIP = newCustomer.NIP;

            Message.InfoMessage("Nowy kontrahent został dodany");
        }
开发者ID:pawlo57,项目名称:Warsztat,代码行数:26,代码来源:CarsFrm.cs


注:本文中的Customer.ShowDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。