示例#1
0
        private void OpenDetailPage(string ID)
        {
            string IDType = new string(ID.Take(ID.IndexOf('_')).ToArray());

            switch (IDType)
            {
            case "Prop":
            {
                PropertyDetails form = new PropertyDetails(Property.PropertyList.Find(i => i.PropertyID == ID), this);
                form.Show();
                break;
            }

            case "Ten":
            {
                TenantDetails form = new TenantDetails(Tenant.TenantList.Find(t => t.TenantID == ID), this);
                form.Show();
                break;
            }

            case "Occ":
            case "Mnt":
            case "Inc":
            case "Pay":
            {
                ViewOccurenceDataForm form = new ViewOccurenceDataForm(Occurence.GetOccurenceByID(ID));
                form.Show();
                break;
            }
            }
        }
示例#2
0
        private void OpenDetailPage(string ID)
        {
            string IDType = new string(ID.Take(ID.IndexOf('_')).ToArray());

            switch (IDType)
            {
                case "Prop":
                    {
                        PropertyDetails form = new PropertyDetails(Property.PropertyList.Find(i => i.PropertyID == ID), this);
                        form.Show();
                        break;
                    }
                case "Ten":
                    {
                        TenantDetails form = new TenantDetails(Tenant.TenantList.Find(t => t.TenantID == ID), this);
                        form.Show();
                        break;
                    }
                case "Occ":
                case "Mnt":
                case "Inc":
                case "Pay":
                    {
                        ViewOccurenceDataForm form = new ViewOccurenceDataForm(Occurence.GetOccurenceByID(ID));
                        form.Show();
                        break;
                    }
            }
        }