Ejemplo n.º 1
0
        public FormAbout()
            : base(UserPermissions.ABOUT_INFORMATION_MODULE)
        {
            InitializeComponent();

            //Display info label automaticaly if text was changed.
            label_Info.TextChanged += label_Info_TextChanged;

            dT = this.informationTableAdapter.GetData();

            if (dT.Count > 0)
            {
                textBox_Name.Text = dT[0].Name;
                textBox_RegistrationNumber.Text = dT[0].RegistrationNumber;
                dateTimePicker_RegistrationDate.Value = dT[0].RegistrationDate;
                textBox_Chairman.Text = dT[0].ChairmanOfTheBoard;
                textBox_Address1.Text = dT[0].LegalAddress;
                textBox_Address2.Text = dT[0].ActualAddress;
                textBox_Phone.Text = dT[0].Phone;
            }
        }
Ejemplo n.º 2
0
        void SaveFunction()
        {
            //Only insert is called because procedure that is called by insert handles both isnert and update
            this.informationTableAdapter.Insert(
                textBox_Name.Text,
                textBox_RegistrationNumber.Text,
                dateTimePicker_RegistrationDate.Value,
                textBox_Chairman.Text,
                textBox_Address1.Text,
                textBox_Address2.Text,
                textBox_Phone.Text);

            if (dT.Count == 0)
                dT = this.informationTableAdapter.GetData();
        }