示例#1
0
        /// <summary>
        /// 添加开发者信息
        /// added by kezesong 2014-5-8
        /// </summary>
        /// <param name="developerModel"></param>
        /// <returns>返回成功的开发者编号</returns>
        public int AddDeveloper(DeveloperModels developerModel)
        {
            int result = -1;

            try
            {
                string sqlText = "INSERT INTO `B_Dev` (`DevName`, `PackFlagIdx`, `Remark`, `CreateTime`, `UpdateTime`, `Status`) VALUES (@devName,@packFlagIdx,@Remark,@CreateTime,@UpdateTime,@status); select last_insert_id(); ";
                List <MySqlParameter> paramList = new List <MySqlParameter>();
                paramList.Add(new MySqlParameter("@devName", developerModel.DevName));
                paramList.Add(new MySqlParameter("@packFlagIdx", string.Empty));
                paramList.Add(new MySqlParameter("@Remark", string.Empty));
                paramList.Add(new MySqlParameter("@CreateTime", DateTime.Now));
                paramList.Add(new MySqlParameter("@UpdateTime", DateTime.Now));
                paramList.Add(new MySqlParameter("@status", 1));

                object ret = MySqlHelper.ExecuteScalar(constr, sqlText, paramList.ToArray());
                result = Tools.GetInt(ret, 0);
                return(result);
            }
            catch (Exception ex)
            {
                return(result);
            }
        }
示例#2
0
 /// <summary>
 /// 添加开发者信息
 /// added by kezesong 2014-5-8
 /// </summary>
 /// <param name="developerModel"></param>
 /// <returns>返回成功的开发者编号</returns>
 public int AddDeveloper(DeveloperModels developerModel)
 {
     return(dal.AddDeveloper(developerModel));
 }