コード例 #1
0
        public override IChildForm CreateChildForm(string name)
        {
            IChildForm form = null;
            string     str  = name;

            if (str != null)
            {
                if (!(str == "基本信息"))
                {
                    if (str == "随访记录")
                    {
                        form = new MentalVisitForm();
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }
                }
                else
                {
                    form = new MentalInfoForm();
                    (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                }
            }
            (form as Form).Text = name;
            form.HaveToSave     = true;
            return(form);
        }
コード例 #2
0
        public override IChildForm CreateChildForm(string name)
        {
            IChildForm form = null;
            string     str  = name;

            if (str != null &&   !string.IsNullOrEmpty(this.RecordsName))
            {
                switch (RecordsName)
                {
                case "老年人记录":
                    OldPeopleInfoFactory.ID = this.ID;
                    if (!(str == "健康评估"))
                    {
                        if (str == "中医保健")
                        {
                            form = new FrmOldMedEX();

                            (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                        }
                    }
                    else
                    {
                        form = new OldPeopleInfoForm();
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }
                    break;

                case "高血压记录":
                    if (!(str == "基本信息"))
                    {
                        if (str == "随访信息")
                        {
                            form = new HypVisitForm {
                                IDPerson = this.ID
                            };
                            (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                        }
                    }
                    else
                    {
                        form = new HypInfoForm();
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }
                    break;

                case "糖尿病记录":
                    if (!(str == "基本信息"))
                    {
                        if (str == "随访信息")
                        {
                            form = new DiaVisitForm {
                                IDPerson = this.ID
                            };
                            (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                        }
                    }
                    else
                    {
                        form = new DiaInfoForm();
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }
                    break;

                case "冠心病记录":
                    if (str == "患者随访")
                    {
                        form = new CHDVisitForm {
                            IDPerson = this.ID
                        };
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }
                    break;

                case "脑卒中记录":
                    if (str == "患者随访")
                    {
                        form = new StrokeVisitForm {
                            IDPerson = this.ID
                        };
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }
                    break;

                case "精神病记录":
                    if (!(str == "基本信息"))
                    {
                        if (str == "随访记录")
                        {
                            form = new MentalVisitForm {
                                IDPerson = this.ID
                            };
                            (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                        }
                    }
                    else
                    {
                        form = new MentalInfoForm();
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }
                    break;

                case "肺结核记录":
                    PTBFactory.ID = this.ID;
                    if (!(str == "第1次入户随访"))
                    {
                        if (str == "随访服务信息1")
                        {
                            form = new PTBVisitForm("1")
                            {
                                IDPerson = this.ID
                            };
                            (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                        }

                        if (str == "随访服务信息2")
                        {
                            form = new PTBVisitForm("2")
                            {
                                IDPerson = this.ID
                            };
                            (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                        }

                        if (str == "随访服务信息3")
                        {
                            form = new PTBVisitForm("3")
                            {
                                IDPerson = this.ID
                            };
                            (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                        }

                        if (str == "随访服务信息4")
                        {
                            form = new PTBVisitForm("4")
                            {
                                IDPerson = this.ID
                            };
                            (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                        }
                    }
                    else
                    {
                        form = new PTBInfoForm {
                            IDPerson = this.ID
                        };
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }
                    break;

                default: break;
                }
            }

            (form as Form).Text = name;
            form.HaveToSave     = true;
            return(form);
        }