Пример #1
0
        public ChildFormStatus CheckErrorInput()
        {
            bool flag = false;

            if (this.dtpNextVisitDate.Value.Date < this.dtpFollowupDate.Value.Date)
            {
                flag = true;
                this.SaveDataInfo = "下次随访日期不能小于当前的随访日期!\r\n";
            }

            if (this.dtpFollowupDate.Value.Date > DateTime.Today)
            {
                PTBVisitForm follow = this;
                string       str    = follow.SaveDataInfo + "随访日期不能晚于当前日期!\r\n";
                follow.SaveDataInfo = str;
                flag = true;
            }

            if ((!this.bindingManager.ErrorInput && !flag))
            {
                return(ChildFormStatus.NoErrorInput);
            }

            return(ChildFormStatus.HasErrorInput);
        }
Пример #2
0
        public override IChildForm CreateChildForm(string name)
        {
            IChildForm form = null;
            string     str  = name;

            if (str != null)
            {
                if (!(str == "第1次入户随访"))
                {
                    if (str == "随访服务信息1")
                    {
                        form = new PTBVisitForm("1");
                        (form as IChildModel <RecordsBaseInfoModel>).Model = ((IParentModel <RecordsBaseInfoModel>) this.MControler.IParentFrm).Model;
                    }

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

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

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

            (form as Form).Text = name;
            form.HaveToSave     = true;
            return(form);
        }
Пример #3
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);
        }