private Dictionary_Type FillModel_Dictionary_Type(IDataReader dr)
        {
            Dictionary_Type m = new Dictionary_Type();

            if (!string.IsNullOrEmpty(dr["ID"].ToString()))
            {
                m.ID = (int)dr["ID"];
            }
            if (!string.IsNullOrEmpty(dr["Name"].ToString()))
            {
                m.Name = (string)dr["Name"];
            }
            if (!string.IsNullOrEmpty(dr["TableName"].ToString()))
            {
                m.TableName = (string)dr["TableName"];
            }

            return(m);
        }
        public Dictionary_Type Dictionary_Type_GetModel(int id)
        {
            SqlDataReader dr = null;

            SqlParameter[] param =
            {
                SQLDatabase.MakeInParam("@ID", SqlDbType.Int, 4, id)
            };
            SQLDatabase.RunProc("MCS_SYS.dbo.sp_Dictionary_Type_GetModel", param, out dr);

            Dictionary_Type model = null;

            if (dr.HasRows)
            {
                dr.Read();
                model = FillModel_Dictionary_Type(dr);
            }
            dr.Close();

            return(model);
        }