public int Addlist(DishTypeInfo di) { string sql = "insert into dishtypeinfo (dtitle,disdelete) values(@title,0)"; SqlParameter[] pms = { new SqlParameter("@title", di.DTitle) }; return(SqlHelper.AddList(sql, pms)); }
public int AddList(Membertypeinfo mi) { string sql = "insert into membertypeinfo(mtitle,mdiscount,misdelete) values (@title,@discount,0)"; SqlParameter[] pms = { new SqlParameter("@title", mi.Mtitle), new SqlParameter("@discount", mi.Mdiscount) }; return(SqlHelper.AddList(sql, pms)); }
public int AddList(MemberInfo mi) { string sql = "insert into memberinfo (mtypeid,mname,mphone,mmoney,misdelete) values(@tid,@name,@phone,@money,0)"; SqlParameter[] pms = new SqlParameter[] { new SqlParameter("@tid", mi.MTypeId), new SqlParameter("@name", mi.MName), new SqlParameter("@phone", mi.MPhone), new SqlParameter("@money", mi.MMoney) }; return(SqlHelper.AddList(sql, pms)); }
/// <summary> /// 增加数据 /// </summary> /// <param name="mi">数据对象</param> /// <returns></returns> public int Addlist(Managerinfo mi) { //string sql = "insert into managerinfo values(@MName,@MPwd,@MType)"; SqlParameter[] pms = { new SqlParameter("@MName", mi.Mname), new SqlParameter("@MPwd", MD5Helper.GetMD5(mi.Mpwd)), new SqlParameter("@MType", mi.MType) }; int s = SqlHelper.AddList("insert into managerinfo values(@MName,@MPwd,@MType)", pms); return(s); }