Ejemplo n.º 1
0
        public override IModel CreateModel(DataRow dr)
        {
            CustomsApplyAttach customsapplyattach = new CustomsApplyAttach();

                    customsapplyattach.CustomsApplyAttachId = Convert.ToInt32(dr["CustomsApplyAttachId"]);

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

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

            return customsapplyattach;
        }
Ejemplo n.º 2
0
        public override IModel CreateModel(SqlDataReader dr)
        {
            CustomsApplyAttach customsapplyattach = new CustomsApplyAttach();

                    int indexCustomsApplyAttachId = dr.GetOrdinal("CustomsApplyAttachId");
                    customsapplyattach.CustomsApplyAttachId = Convert.ToInt32(dr[indexCustomsApplyAttachId]);

                    int indexCustomsApplyId = dr.GetOrdinal("CustomsApplyId");
                    if(dr["CustomsApplyId"] != DBNull.Value)
                    {
                    customsapplyattach.CustomsApplyId = Convert.ToInt32(dr[indexCustomsApplyId]);
                    }

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

            return customsapplyattach;
        }