Example #1
0
        public virtual bool Add(DbConn PubConn, DbModels.certcenterlog model)
        {
            List <ProcedureParameter> Par = new List <ProcedureParameter>()
            {
                new ProcedureParameter("@url", model.url),
                //
                new ProcedureParameter("@reqdata", model.reqdata),
                //
                new ProcedureParameter("@userid", model.userid),
                new ProcedureParameter("@username", model.username),
                //
                new ProcedureParameter("@reqtime", model.reqtime),
                //
                new ProcedureParameter("@ip", model.ip),
                //
                new ProcedureParameter("@opecontent", model.opecontent)
            };
            int rev = PubConn.ExecuteSql(@"insert into certcenterlog(url,reqdata,userid,username,reqtime,ip,opecontent)
										   values(@url,@reqdata,@userid,@username,@reqtime,@ip,@opecontent)"                                        , Par);

            return(rev == 1);
        }
Example #2
0
        public virtual bool Edit(DbConn PubConn, DbModels.certcenterlog model)
        {
            List <ProcedureParameter> Par = new List <ProcedureParameter>()
            {
                new ProcedureParameter("@url", model.url),
                //
                new ProcedureParameter("@reqdata", model.reqdata),
                //
                new ProcedureParameter("@userid", model.userid),
                new ProcedureParameter("@username", model.username),
                //
                new ProcedureParameter("@reqtime", model.reqtime),
                //
                new ProcedureParameter("@ip", model.ip),
                //
                new ProcedureParameter("@opecontent", model.opecontent)
            };

            Par.Add(new ProcedureParameter("@id", model.id));

            int rev = PubConn.ExecuteSql("update certcenterlog set url=@url,reqdata=@reqdata,userid=@userid,username =@username,reqtime=@reqtime,ip=@ip,opecontent=@opecontent where id=@id", Par);

            return(rev == 1);
        }