//
 public dynamic GetModel(int Id)
 {
     try
     {
         dynamic       model  = null;
         StringBuilder strSql = new StringBuilder();
         strSql.Append("select  top 1 Id,TypeCertificationName,Editor,CreateDate from T_MemberTypeCertification ");
         strSql.Append(" where Id=@Id");
         SqlParameter[] parameters =
         {
             new SqlParameter("@Id", SqlDbType.Int, 4)
         };
         parameters[0].Value = Id;
         using (dynamic read = DbHelperSQL.ExecuteReader(strSql.ToString(), parameters))
         {
             model = new MemberTypeCertification();
             if (read.Read())
             {
                 try { model.Id = int.Parse(read["Id"].ToString()); }
                 catch { }
                 model.TypeCertificationName = read["TypeCertificationName"].ToString();
                 model.Editor = read["Editor"].ToString();
                 try { model.CreateDate = DateTime.Parse(read["CreateDate"].ToString()); }
                 catch { }
             }
             read.Dispose();
         }
         return(model);
     }
     catch { throw; }
 }
        private dynamic GetModels(HttpContext context)
        {
            dynamic model = new MemberTypeCertification();

            model.TypeCertificationName = context.Request.Form["TypeCertificationName"];
            model.Editor = adminUser.AdminName;
            try { model.Id = int.Parse(context.Request.Form["Id"].ToString()); }
            catch { model.Id = 0; }
            return(model);
        }
 //
 public bool Create(MemberTypeCertification model)
 {
     try
     {
         StringBuilder strSql = new StringBuilder();
         strSql.Append("insert into T_MemberTypeCertification(");
         strSql.Append("TypeCertificationName,Editor,CreateDate)");
         strSql.Append(" values (");
         strSql.Append("@TypeCertificationName,@Editor,@CreateDate)");
         if (DbHelperSQL.ExecuteSql(strSql.ToString(), GetSqlParameter(model)) > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch { throw; }
 }
 //
 public bool Update(MemberTypeCertification model)
 {
     try
     {
         StringBuilder strSql = new StringBuilder();
         strSql.Append("update T_MemberTypeCertification set ");
         strSql.Append("TypeCertificationName=@TypeCertificationName,");
         strSql.Append("Editor=@Editor,");
         strSql.Append("CreateDate=@CreateDate");
         strSql.Append(" where Id=@Id");
         if (DbHelperSQL.ExecuteSql(strSql.ToString(), GetSqlParameter(model)) > 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch { throw; }
 }