コード例 #1
0
        private void dataGridViewPosts_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            int id   = int.Parse(dataGridViewPosts.SelectedRows[0].Cells[0].Value.ToString());
            var post = _qt.GetDirectoryPost(id);

            textBoxNameOfPost.Text             = post.Name;
            comboBoxTypeOfPost.SelectedItem    = post.DirectoryTypeOfPost.Name;
            comboBoxNameOfCompany.SelectedItem = post.DirectoryCompany.Name;
            dateTimePickerDate.Value           = post.Date;
            textBoxWorkerSalary.Text           = post.UserWorkerSalary.ToString();
            textBoxHalfWorkerSalary.Text       = post.UserHalfWorkerSalary.ToString();
        }
コード例 #2
0
ファイル: FormWorker.cs プロジェクト: breshch/AIS
        private void buttonAddCompanyAndPost_Click(object sender, EventArgs e)
        {
            using (var form = new FormAddComanyAnadPostToWorker())
            {
                form.ShowDialog();
                var currentTmpPost = form.GetPost();
                var directoryPost  = _qt.GetDirectoryPost(currentTmpPost.Date, currentTmpPost.PostName, currentTmpPost.CompanyName);

                AddCurrentPostToDataGrid(directoryPost, currentTmpPost.Date);
            }
        }