Пример #1
0
        public static bool Add(SMS.Model.AccountEnterprise model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into AccountEnterprise(");
            strSql.Append("UserCode,EnterpriseCode)");
            strSql.Append(" values (");
            strSql.Append("@UserCode,@EnterpriseCode)");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@UserCode",       MySqlDbType.VarChar, 64),
                new MySqlParameter("@EnterpriseCode", MySqlDbType.VarChar, 128)
            };
            parameters[0].Value = model.UserCode;
            parameters[1].Value = model.EnterpriseCode;
            int rows = DBUtility.MySqlHelper.ExecuteNonQuery(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
 public static bool Add(SMS.Model.AccountEnterprise model)
 {
     return(DAL.AccountEnterprise.Add(model));
 }