示例#1
0
        public static int batchAdd(List <Pingfen> pinfenList)
        {
            if (pinfenList.Count < 1)
            {
                return(0);
            }
            String        sql = "insert into pingfen(ypzzpid,kgzpid,shitiid,xdbzid,chengji,pfstate) values ";
            StringBuilder sb  = new StringBuilder();

            sb.Append(sql);
            for (int i = 0; i < pinfenList.Count; i++)
            {
                Pingfen pingfen = pinfenList[i];
                sb.Append("(").
                Append(pingfen.YpzzpID).Append(",").
                Append(pingfen.KgzpID).Append(",").
                Append(pingfen.ShitiID).Append(",").
                Append(pingfen.XdbzID).Append(",").
                Append(pingfen.Score).Append(",").
                Append(1).Append(" )");
                if (i < pinfenList.Count - 1)
                {
                    sb.Append(",");
                }
            }
            sql = sb.ToString();
            return(MySqlDBHelper.ExecuteCommand(sql));
        }
        public static int Add(Politic politic)
        {
            String sql = "insert into politic(politicname) values(@politicname)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@politicname", politic.PoliticName));
            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#3
0
        public static int DeleteByID(int _id)
        {
            String sql = "delete from pingjiabiaozhun where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", _id));
            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int Add(Xueli xl)
        {
            String sql = "insert into Xueli(degreename) values(@degreename)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@degreename", xl.XueliName));
            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int Delete(int id)
        {
            String sqlstr = "delete from kaoti where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", id));
            return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray()));
        }
        public static int UpdateZhaopinItemTitle(int id, string title_t)
        {
            String sqlstr = "update zhaopinitem set title=@title where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", id));
            para_list.Add(new MySqlParameter("@title", title_t));
            return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray()));
        }
示例#7
0
        public static int UpdateKaotiIndex(int id, int ktid)
        {
            String sqlstr = "update zhaopin set ktid=@ktid where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", id));
            para_list.Add(new MySqlParameter("@ktid", ktid));
            return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray()));
        }
示例#8
0
        public static int UpdateSubmitState(YingpinzheZhaopin ypzzp)
        {
            String sql = "update yingpingzhezhaopin set submitstate=@submitstate where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", ypzzp.ID));
            para_list.Add(new MySqlParameter("@submitstate", ypzzp.SubmitState));
            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#9
0
        public static int UpdateIndex(int id, int ord)
        {
            String sql = "update yingpingzhezhaopin set ranindex=@ranindex where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", id));
            para_list.Add(new MySqlParameter("@ranindex", ord));
            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int UpdateWeight(int kgzpid, int w)
        {
            String sql = "update kaoguanzhaopin set weight=@weight where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", kgzpid));
            para_list.Add(new MySqlParameter("@weight", w));
            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int Add(UserInfo userinfo)
        {
            String sql = "insert into userinfo(uname,pwd) values(@uname,@pwd)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@uname", userinfo.Username));
            para_list.Add(new MySqlParameter("@pwd", userinfo.Password));
            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#12
0
        public static int UpdataPassword(int id, string pwd)
        {
            String sql = "update kaoguan set password=@password where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", id));
            para_list.Add(new MySqlParameter("@password", pwd));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int Update(Xiangdianbiaozhun xb)
        {
            String sql = "update xdbz set mycontent=@mycontent where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", xb.Id));
            para_list.Add(new MySqlParameter("@mycontent", xb.MyContent));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#14
0
        public static int Update(Pingfen pf)
        {
            String sql = "update pingfen set chengji=@chengji where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", pf.Id));
            para_list.Add(new MySqlParameter("@chengji", pf.Score));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int UpdateScore(int id, int score)
        {
            String sql = "update pingjiaxiangdian set score=@score where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", id));
            para_list.Add(new MySqlParameter("@score", score));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int UpdatePassword(string username, string password)
        {
            String sql = "update userinfo set pwd=@pwd where uname=@uname";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@pwd", password));
            para_list.Add(new MySqlParameter("@uname", username));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int Add(Pingjiaxiangdian pjxd)
        {
            String sql = "insert into pingjiaxiangdian(content,score) values(@content,@score)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@content", pjxd.Content));
            para_list.Add(new MySqlParameter("@score", pjxd.Score));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#18
0
        public static int DeleteDepartMent(int did)//假删
        {
            String sqlstr = "update department set bmstate=@bmstate where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", did)); int s = 0;
            para_list.Add(new MySqlParameter("@bmstate", s));

            return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray()));
        }
示例#19
0
        public static int UpdateKaoti(Kaoti kt)
        {
            String sql = "update kaoti set title=@title,zpgwid=@zpgwid,createtime=@createtime where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@title", kt.Title));
            para_list.Add(new MySqlParameter("@zpgwid", kt.ZpgwId));
            para_list.Add(new MySqlParameter("@createtime", kt.CreateTime));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#20
0
        public static int DeleteZhaopinFb(int id)
        {
            int    s      = 0;
            String sqlstr = "update zpfb set fbstate=@fbstate where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@fbstate", s));
            para_list.Add(new MySqlParameter("@id", id));

            return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray()));
        }
示例#21
0
        public static int Add(Pingjiabiaozhun pjbz)
        {
            String sql = "insert into pingjiabiaozhun(content,pjxdid,ckscore) values(@content,@pjxdid,@ckscore)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@content", pjbz.Content));
            para_list.Add(new MySqlParameter("@pjxdid", pjbz.PjxdID));
            para_list.Add(new MySqlParameter("@ckscore", pjbz.CkScore));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#22
0
        public static int Add(YingpinzheZhaopin yz)
        {
            String sql = "insert into yingpingzhezhaopin(ypzid,zpid,ranindex) values(@ypzid,@zpid,@ranindex)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@ypzid", yz.YpzID));
            para_list.Add(new MySqlParameter("@zpid", yz.ZhaopinId));
            para_list.Add(new MySqlParameter("@ranindex", yz.MsIndex));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#23
0
        public static int Update(Pingjiabiaozhun pjbz)
        {
            String sql = "update pingjiabiaozhun set content=@content,ckscore=@ckscore where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", pjbz.Id));
            para_list.Add(new MySqlParameter("@content", pjbz.Content));
            para_list.Add(new MySqlParameter("@score", pjbz.CkScore));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int Add(ZhaopinItem zp)
        {
            String sqlstr = "insert into zhaopinitem(title,pubtime,zpitemstate) values(@title,@pubtime,@zpitemstate)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@title", zp.Title));
            para_list.Add(new MySqlParameter("@pubtime", zp.PubTime));
            para_list.Add(new MySqlParameter("@zpitemstate", 1));

            return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray()));
        }
        public static int Add(KaoguanZhaopin kz)
        {
            String sql = "insert into kaoguanzhaopin(kgid,zpid,weight) values(@kgid,@zpid,@weight)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@kgid", kz.KaoguanID));
            para_list.Add(new MySqlParameter("@zpid", kz.ZhaopinID));
            para_list.Add(new MySqlParameter("@weight", kz.Weight));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#26
0
        public static int Update(ZhaopinGw zpgw)
        {
            String sqlstr = "update zpgw set zpbm=@zpbm,zppos=@zppos";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@zpbm", zpgw.ZpDepart));
            para_list.Add(new MySqlParameter("@zppos", zpgw.ZpPosition));
            para_list.Add(new MySqlParameter("@id", zpgw.Id));

            return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray()));
        }
示例#27
0
        public static int Add(YpzZhaopinkgzp ypzkg)
        {
            String sql = "insert into ypzkgsubmit(ypzzpid,kgzpid,submitstate) values(@ypzzpid,@kgzpid,@submitstate)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@ypzzpid", ypzkg.YpzzpID));
            para_list.Add(new MySqlParameter("@kgzpid", ypzkg.KgzpID));
            para_list.Add(new MySqlParameter("@submitstate", ypzkg.KgYpzSubmitState));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
        public static int Add(Xiangdianbiaozhun xb)
        {
            String sql = "insert into xdbz(xdid,bzid,mycontent) values(@xdid,@bzid,@mycontent)";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@xdid", xb.PjxdID));
            para_list.Add(new MySqlParameter("@bzid", xb.PjbzID));
            para_list.Add(new MySqlParameter("@mycontent", xb.MyContent));

            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#29
0
        public static int UpdateSubmitStateByypzzpkgzp(YpzZhaopinkgzp ypzzpkgzp)
        {
            String sql = "update ypzkgsubmit set submitstate=@submitstate " +
                         " where ypzkgsubmit.ypzzpid= " + ypzzpkgzp.YpzzpID +
                         "   and  ypzkgsubmit.kgzpid= " + ypzzpkgzp.KgzpID;
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", ypzzpkgzp.ID));
            para_list.Add(new MySqlParameter("@submitstate", ypzzpkgzp.KgYpzSubmitState));
            return(MySqlDBHelper.ExecuteCommand(sql, para_list.ToArray()));
        }
示例#30
0
        public static int UpdateDepartment(Department department)
        {
            String sqlstr = "update department set departname=@departname,info=@info where id=@id";
            List <MySqlParameter> para_list = new List <MySqlParameter>();

            para_list.Add(new MySqlParameter("@id", department.Id));
            para_list.Add(new MySqlParameter("@departname", department.Name));
            para_list.Add(new MySqlParameter("@info", department.Info));

            return(MySqlDBHelper.ExecuteCommand(sqlstr, para_list.ToArray()));
        }