Example #1
0
        private void EditDocForm_Load(object sender, EventArgs e)
        {
            comboBox1.DataSource       = BD.GetTable("Sp_Post");
            comboBox1.DisplayMember    = "name_post";
            comboBox1.ValueMember      = "id_post";
            labelDocNum.Text          += BD.DocNum.ToString();
            dataGridViewTov.DataSource = BD.GetTablePolya("Sp_Mat", "id_mat", "name_mat", "kl_opt");
            dataGridView1.DataSource   = Doc_Tovar.GetTovar(BD.DocNum);

            button2.Enabled = false;
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();

            button_Prihod.Visible  = false;
            button_Rashod.Visible  = false;
            button_Correct.Visible = false;

            comboBox_Login.DisplayMember = "name_sotr";
            comboBox_Login.ValueMember   = "id_sort";

            comboBox_Login.DataSource = BD.GetTable("Sp_Sotr");
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            Changing <string> .Rewrite(textBox_Pass.Text);

            DataTable dt   = BD.GetTable("Sp_Sotr");
            int       id   = (int)comboBox_Login.SelectedIndex;
            string    pass = dt.Rows[id][2].ToString().Trim();

            if (textBox_Pass.Text == pass)
            {
                button_Prihod.Visible  = true;
                button_Rashod.Visible  = true;
                button_Correct.Visible = true;
            }
        }