Exemplo n.º 1
0
        public void InsertProjectsTable(string name, int manager, int status, string desc, DateTime startDate, DateTime?endDate)
        {
            ProjectTrackingDataSetTableAdapters.ProjectsTableAdapter myAdapter = GetProjectsAdapter();
            myAdapter.Insert(name, manager, status, desc, startDate, endDate);

            myDataSet.Projects.AcceptChanges();

            myAdapter.Update(myDataSet.Projects);
        }
Exemplo n.º 2
0
        public void DeleteProjectRow(int project)
        {
            ProjectTrackingDataSetTableAdapters.ProjectsTableAdapter myAdapter = GetProjectsAdapter();

            myAdapter.Delete(project);

            myDataSet.Projects.AcceptChanges();

            myAdapter.Update(myDataSet.Projects);
        }
Exemplo n.º 3
0
        public void UpdateProjectRow(int rowIndex, string name, int manager, int status, string desc, DateTime startDate, DateTime?endDate)
        {
            ProjectTrackingDataSetTableAdapters.ProjectsTableAdapter myAdapter = GetProjectsAdapter();

            myDataSet.Projects[rowIndex][1] = name;
            myDataSet.Projects[rowIndex][2] = manager;
            myDataSet.Projects[rowIndex][3] = status;
            myDataSet.Projects[rowIndex][4] = desc;
            myDataSet.Projects[rowIndex][5] = startDate;
            if (endDate == null)
            {
                myDataSet.Projects[rowIndex][6] = DBNull.Value;
            }
            else
            {
                myDataSet.Projects[rowIndex][6] = endDate;
            }

            myAdapter.Update(myDataSet.Projects);
        }