Пример #1
0
        private void frmInputWork_Load(object sender, EventArgs e)
        {
            ProjectTrackingDataSetTableAdapters.EmployeeWorkTableAdapter myAdapter = new ProjectTrackingDataSetTableAdapters.EmployeeWorkTableAdapter();
            myAdapter.Fill(parent.MyDataSet.EmployeeWork);

            cbEmployeeID.DisplayMember = "FullName";
            cbEmployeeID.ValueMember   = "EmployeeID";

            cbTaskID.ValueMember   = "TaskID";
            cbTaskID.DisplayMember = "TaskName";

            FillComboBoxes();

            UpdateSelectedRow();
            manageEditingEnables(true);
        }
Пример #2
0
        protected override void fillControls()
        {
            try
            {
                //gather the data about employee work
                ProjectTrackingDataSetTableAdapters.EmployeeWorkTableAdapter myAdapter = new ProjectTrackingDataSetTableAdapters.EmployeeWorkTableAdapter();
                myAdapter.Fill(parent.MyDataSet.EmployeeWork);

                numRows = parent.MyDataSet.EmployeeWork.Rows.Count;

                //store the data at the selected row in the controls
                cbTaskID.SelectedValue       = parent.MyDataSet.EmployeeWork[rowIndex][0];
                cbEmployeeID.SelectedValue   = parent.MyDataSet.EmployeeWork[rowIndex][1];
                dtpWorkDate.Value            = DateTime.Parse(parent.MyDataSet.EmployeeWork[rowIndex][2].ToString());
                workHoursNumericUpDown.Value = Decimal.Parse(parent.MyDataSet.EmployeeWork[rowIndex][3].ToString());
            }
            catch
            {
                parent.SetReadyLabel("Load Failed");
            }
        }
Пример #3
0
 public ProjectTrackingDataSetTableAdapters.EmployeeWorkTableAdapter GetEmpWorkAdapter()
 {
     ProjectTrackingDataSetTableAdapters.EmployeeWorkTableAdapter ewData = new ProjectTrackingDataSetTableAdapters.EmployeeWorkTableAdapter();
     ewData.Fill(myDataSet.EmployeeWork);
     return(ewData);
 }