コード例 #1
0
 private void ShowUserControllerForEdit(Payment Pay)
 {
     if (Pay.CardToCard != null)
     {
         View.CardtoCard UC = new View.CardtoCard(Pay, Pay.CardToCard);
         UC.Dock = DockStyle.Fill;
         splitContainer1.Panel2.Controls.Add(UC);
     }
     if (Pay.Check != null)
     {
         View.Check UC = new View.Check(Pay, Pay.Check);
         UC.Dock = DockStyle.Fill;
         splitContainer1.Panel2.Controls.Add(UC);
     }
     if (Pay.BankFish != null)
     {
         View.BankFish UC = new View.BankFish(Pay, Pay.BankFish);
         UC.Dock = DockStyle.Fill;
         splitContainer1.Panel2.Controls.Add(UC);
     }
     if (Pay.BankFish == null && Pay.BankFish == null && Pay.CardToCard == null && Pay.Check == null)
     {
         View.Pure UC = new View.Pure(Pay);
         UC.Dock = DockStyle.Fill;
         splitContainer1.Panel2.Controls.Add(UC);
     }
     // this.Close();
 }
コード例 #2
0
        private void Combo_Payment_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (Combo_Payment.SelectedIndex)
            {
                case 0:
                    splitContainer1.Panel2.Controls.Clear();
                    View.Check UC_Check = null;
                    if (State == States.WriteC)
                    {
                        UC_Check = new View.Check(Cr);

                    }
                    if (State == States.WriteF)
                    {
                        UC_Check = new View.Check(Fa);

                    }
                    if (State == States.WriteP)
                    {
                        UC_Check = new View.Check(Pu);
                    }
                    if (State == States.WritePro)
                    {
                        UC_Check = new View.Check(Pro);
                    }
                    if (State == States.Normal)
                    {
                        UC_Check = new View.Check();
                    }
                    if (State == States.People)
                    {
                        UC_Check=new View.Check(PersonId);
                    }
                    UC_Check.Dock = DockStyle.Fill;
                    splitContainer1.Panel2.Controls.Add(UC_Check);
                    break;
                case 1:
                    splitContainer1.Panel2.Controls.Clear();
                    View.CardtoCard UC_Card = null;
                    if (State == States.WriteC)
                    {
                        UC_Card = new View.CardtoCard(Cr);

                    }
                    if (State == States.WriteF)
                    {
                        UC_Card = new View.CardtoCard(Fa);

                    }
                    if (State == States.WriteP)
                    {
                        UC_Card = new View.CardtoCard(Pu);
                    }
                    if (State == States.WritePro)
                    {
                        UC_Card = new View.CardtoCard(Pro);
                    }
                    if (State == States.Normal)
                    {
                        UC_Card = new View.CardtoCard();
                    }
                    if (State == States.People)
                    {
                        UC_Card = new View.CardtoCard(PersonId);
                    }
                    UC_Card.Dock = DockStyle.Fill;
                    splitContainer1.Panel2.Controls.Add(UC_Card);
                    break;
                case 2:
                    splitContainer1.Panel2.Controls.Clear();
                    View.BankFish UC_Fish = null;
                    if (State == States.WriteC)
                    {
                        UC_Fish = new View.BankFish(Cr);

                    }
                    if (State == States.WriteF)
                    {
                        UC_Fish = new View.BankFish(Fa);

                    }
                    if (State == States.WriteP)
                    {
                        UC_Fish = new View.BankFish(Pu);
                    }
                    if (State == States.WritePro)
                    {
                        UC_Fish = new View.BankFish(Pro);
                    }
                    if (State == States.Normal)
                    {
                        UC_Fish = new View.BankFish();
                    }
                    if (State == States.People)
                    {
                        UC_Fish = new View.BankFish(PersonId);
                    }
                    UC_Fish.Dock = DockStyle.Fill;
                    splitContainer1.Panel2.Controls.Add(UC_Fish);
                    break;
                case 3:
                    splitContainer1.Panel2.Controls.Clear();
                    View.Pure UC_Pure = null;
                    if (State == States.WriteC)
                    {
                        UC_Pure = new View.Pure(Cr);

                    }
                    if (State == States.WriteF)
                    {
                        UC_Pure = new View.Pure(Fa);

                    }
                    if (State == States.WriteP)
                    {
                        UC_Pure = new View.Pure(Pu);
                    }
                    if (State == States.WritePro)
                    {
                        UC_Pure = new View.Pure(Pro);
                    }
                    if (State == States.Normal)
                    {
                        UC_Pure = new View.Pure();
                    }
                    if (State == States.People)
                    {
                        UC_Pure = new View.Pure(PersonId);
                    }
                    UC_Pure.Dock = DockStyle.Fill;
                    splitContainer1.Panel2.Controls.Add(UC_Pure);
                    break;
            }
        }