コード例 #1
0
ファイル: Form4.cs プロジェクト: henio180/AplikacjeBazodanowe
        private void button2_Click(object sender, EventArgs e)
        {
            String name, lastName;

            try
            {
                name = customerName.Text;
                lastName = customerLastName.Text;

                Customer customer = new Customer();
                customer.setName(name);
                customer.setLastName(lastName);

                cMode.insercik(customer, 3);
                MessageBox.Show("Inserted", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            catch
            {
                MessageBox.Show("Something went wrong!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
ファイル: FormInterface.cs プロジェクト: m12k/Files
        private void FormInterface_Load(object sender, EventArgs e)
        {
            IOperation operation;
            Person p = new Person();

            IPerson person = p as IPerson;
            operation = p as IOperation;

            person.Lastname = "Cajandig";
            person.Firstname = "Mikel";
            //operation.Save();



            Customer c = new Customer();
            Icustomer customer = c as Icustomer;
            operation = c as IOperation;
            customer.LastName = "tininin";
            operation.Save();

             
           
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: rodchar/csgen
 public Form1()
 {
     InitializeComponent();
     selectedCustomer = new Customer() { Id = 2, FirstName = "Jane" };
 }