示例#1
0
        private void SaveGrids()
        {
            List<tblTask> listOfFiles = gdTasks.DataSource as List<tblTask>;
            tblTaskDap newdap = new tblTaskDap();
            foreach (eProtocolData.Entities.tblTask item in bsTasks)
            {
                if (item.fldProjectID != null)
                {
                    newdap.Update(item);
                }
                else
                {
                    item.fldProjectID = _tblProject.fldProjectID;
                    newdap.Insert(item);
                }

            }
        }
示例#2
0
        private void FillGrids()
        {
            List<vwvwProjectFile> listOfFiles = new List<vwvwProjectFile>();
            vwvwProjectFileDap newDap = new vwvwProjectFileDap();
            listOfFiles = newDap.GetProjectFiles(_tblProject.fldProjectID);
            bsFiles.DataSource = listOfFiles;

            List<tblTask> listOfTasks = new List<tblTask>();
            tblTaskDap newTaskDap = new tblTaskDap();
            listOfTasks = newTaskDap.GetByfldProjectID(_tblProject.fldProjectID);
            bsTasks.DataSource = listOfTasks;

            List<tblEmployee> listOfEmployees = new List<tblEmployee>();
            tblEmployeeDap newEmployeeDap = new tblEmployeeDap();
            listOfEmployees = newEmployeeDap.GetAll();
            bsEmployee.DataSource = listOfEmployees;
        }
 public List<tblTask> GettblTaskByfldProjectID(Int64 fldProjectID)
 {
     using (var dap = new tblTaskDap(this))
     {
         return dap.GetByfldProjectID(fldProjectID);
     }
 }