示例#1
0
        public override IModel CreateModel(DataRow dr)
        {
            SplitDocAttach splitdocattach = new SplitDocAttach();

                    splitdocattach.SplitDocAttachId = Convert.ToInt32(dr["SplitDocAttachId"]);

                    if(dr["SplitDocId"] != DBNull.Value)
                    {
                    splitdocattach.SplitDocId = Convert.ToInt32(dr["SplitDocId"]);
                    }

                    if(dr["SplitDocDetailId"] != DBNull.Value)
                    {
                    splitdocattach.SplitDocDetailId = Convert.ToInt32(dr["SplitDocDetailId"]);
                    }

                    if(dr["AttachId"] != DBNull.Value)
                    {
                    splitdocattach.AttachId = Convert.ToInt32(dr["AttachId"]);
                    }

            return splitdocattach;
        }
示例#2
0
        public override IModel CreateModel(SqlDataReader dr)
        {
            SplitDocAttach splitdocattach = new SplitDocAttach();

                    int indexSplitDocAttachId = dr.GetOrdinal("SplitDocAttachId");
                    splitdocattach.SplitDocAttachId = Convert.ToInt32(dr[indexSplitDocAttachId]);

                    int indexSplitDocId = dr.GetOrdinal("SplitDocId");
                    if(dr["SplitDocId"] != DBNull.Value)
                    {
                    splitdocattach.SplitDocId = Convert.ToInt32(dr[indexSplitDocId]);
                    }

                    int indexSplitDocDetailId = dr.GetOrdinal("SplitDocDetailId");
                    if(dr["SplitDocDetailId"] != DBNull.Value)
                    {
                    splitdocattach.SplitDocDetailId = Convert.ToInt32(dr[indexSplitDocDetailId]);
                    }

                    int indexAttachId = dr.GetOrdinal("AttachId");
                    if(dr["AttachId"] != DBNull.Value)
                    {
                    splitdocattach.AttachId = Convert.ToInt32(dr[indexAttachId]);
                    }

            return splitdocattach;
        }