コード例 #1
0
        //method to fetch the project related to the respective person who is the leader
        public List <ProjectDetailView> GetProjectById(int Id)
        {
            List <ProjectDetailView> projectdetail = new List <ProjectDetailView>();
            List <ProjectMaster>     prolist       = _repocontext.GetAllProjects();
            List <Projectmembers>    prodetvie     = _repocontext.GetRoleOf();

            foreach (Projectmembers promem in prodetvie)
            {
                if (promem.MemberId == Id)
                {
                    foreach (ProjectMaster pro in prolist)
                    {
                        if (pro.ProjectId == promem.ProjectId)
                        {
                            ProjectDetailView prodetail = new ProjectDetailView()
                            {
                                ProjectId          = pro.ProjectId,
                                Name               = pro.Name,
                                ProjectDescription = pro.ProjectDescription,
                                TechnologyUsed     = pro.TechnologyUsed,
                                ActAs              = promem.ActAs
                            };
                            projectdetail.Add(prodetail);
                        }
                    }
                }
            }
            return(projectdetail);
        }
コード例 #2
0
        // Update the Project Detail right View

        public void UpdateRightTableView(object sender, EventArgs e)
        {
            try
            {
                var arg = e as DashBoardEventArgs;

                if (arg != null && arg.RowType == RowType.Content)
                {
                    ProjectDetailView.Source = new DB_DetailTableSource(arg.InspectionDetail);
                    ProjectDetailView.Hidden = false;
                    ProjectDetailView.ReloadData();
                }
                else if (arg != null && arg.RowType == RowType.Header)
                {
                    ProjectDetailView.Hidden = true;
                }
                else if (arg != null && arg.RowType == RowType.None)
                {
                    if (arg.InspectionDetail.IsFinalise > 0)
                    {
                        UIAlertView alert = new UIAlertView(@"Alert", @"Inspection is Finalise", null, NSBundle.MainBundle.LocalizedString("OK", "OK"));
                        alert.Show();
                    }
                    else
                    {
                        arg.InspectionDetail.RepresentativeName = UserName;

                        if (!IsFirstLogin && arg.InspectionDetail.IsFinalise == 0)
                        {
                            arg.InspectionDetail.InspectionStarted = 1;
                        }

                        InspectionViewController inspectionViewController = this.Storyboard.InstantiateViewController("InspectionViewController") as InspectionViewController;
                        inspectionViewController.InspectionData = arg.InspectionDetail;
                        this.NavigationController.PushViewController(inspectionViewController, true);
                    }
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Exception Occured in UpadteRightTableView method due to " + ex.Message);
            }
        }
コード例 #3
0
    private void OpenProjectInfo(object _project)
    {
        ProjectDetailView project = new ProjectDetailView((Project)_project);

        project.ShowDialog();
    }