Ejemplo n.º 1
0
        private void addFunc(Subject info)
        {
            InitializeComponent();

            int posy = 10;

            Controls.Add(INN        = new InfoPlate(posy, "ИНН", info.ITaxNum, "0000"));
            Controls.Add(FIO        = new InfoPlate(posy += 35, "ФИО", info.Name));
            Controls.Add(DATEREGIST = new InfoPlate(posy += 35, "дата регестрации", info.StartDate.ToString("dd.MM.yyyy"), "00/00/0000"));
            Controls.Add(OECVED     = new InfoPlate(posy += 35, "коды ОКВЭД( 21,... )", info.ActivitiesToString()));

            Controls.Add(TAX = new ComboBox
            {
                SelectedText = "Тип налогообложения",
                Location     = new Point(10, posy += 35),
                Size         = new Size(300, 10),
                Items        =
                {
                    (TaxTypes.УСН).ToString(),
                    (TaxTypes.ОСНО).ToString(),
                    (TaxTypes.ПСН).ToString(),
                    (TaxTypes.ЕНВД).ToString(),
                },
                SelectedIndex = (object)info.TaxType != null ? (int)info.TaxType : -1,
                DropDownStyle = ComboBoxStyle.DropDownList,
            });
            mainSubject = info;

            buttonOK = new Button()
            {
                Size     = new Size(360, 25),
                Location = new Point(Width / 2 - Size.Width / 3, Height - Height / 5),
                Anchor   = AnchorStyles.Bottom,
                Text     = "продолжить",
            };
            buttonOK.Click += buttonOK_Click;
            Controls.Add(buttonOK);
        }