예제 #1
0
        /// <summary>
        /// Get all section properties in the specified model whcih have a mapping extry in this table
        /// </summary>
        /// <param name="inModel"></param>
        /// <returns></returns>
        public FamilyCollection AllMappedSections(Model.Model inModel)
        {
            var result = new FamilyCollection();

            if (ContainsKey(SectionCategory))
            {
                foreach (Guid guid in this[SectionCategory].Keys)
                {
                    if (inModel.Families.Contains(guid))
                    {
                        result.Add(inModel.Families[guid]);
                    }
                }
            }
            return(result);
        }
예제 #2
0
        private void OnAddFamilyExecute(ListBox list)
        {
            if (FamilyName != null & FamilyCardID != null & FamilyMark != null & FamilyRelationship != null & CBFBM != null)
            {
                CBF_JTCYModels Family = new CBF_JTCYModels();
                Family.ID   = CBFBM;
                Family.Name = FamilyName;
                if (FamilySex == "男")
                {
                    Family.Sex = "1";
                }
                else
                {
                    Family.Sex = "2";
                }

                // Family.CertificateType = PropertyCodeEnumModels.CertificateType.IDCard;
                #region 设置证件类型枚举值
                switch (CardType)
                {
                case "身份证":
                    Family.CertificateType = "1";
                    break;

                case "军官证":
                    Family.CertificateType = "2";
                    break;

                case "行政企事业单位机构代码证或法人代码证":
                    Family.CertificateType = "3";
                    break;

                case "户口簿":
                    Family.CertificateType = "4";
                    break;

                case "护照":
                    Family.CertificateType = "5";
                    break;

                default:
                    Family.CertificateType = "其他";
                    break;
                }
                #endregion
                //Family.CertificateType = CardType;
                Family.CardNumber   = FamilyCardID;
                Family.RelationShip = FamilyRelationship;
                Family.Note         = FamilyMark;
                Family.IsShared     = SFGYR;

                FamilyCollection.Add(Family);
                FamilyCardID       = null;
                FamilyMark         = null;
                FamilyName         = null;
                FamilySex          = null;
                FamilyRelationship = null;
            }
            else
            {
                MessageBox.Show("天剑出错,请检查表单数据的完整性与正确性");
            }
        }