public bool UpdatePassword(string username, string password) { string sql = "update sysuser set password=@password where username=@username and status=1"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@username", username), new SqlParameter("@password", password) }; return(sqlconn.ExecuteSql(sql, param) > 0 ? true : false); }
public bool InsertRoleInfo(string rolename, string remark, string createby) { string sql = "insert into roleinfo (rolename,remark,createby,createtime) values(@rolename,@remark,@createby,getdate())"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@rolename", rolename), new SqlParameter("@remark", remark), new SqlParameter("@createby", createby) }; return(sqlconn.ExecuteSql(sql, param) > 0 ? true : false); }
public bool InsertDeptInfo(string deptname, string remark, string createby) { string sql = "insert into department (deptname,remark,createby,createtime) values(@deptname,@remark,@createby,getdate())"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@deptname", deptname), new SqlParameter("@remark", remark), new SqlParameter("@createby", createby) }; return(sqlconn.ExecuteSql(sql, param) > 0?true:false); }
public bool InsertMenuInfo(string menuname, string path, int parentid, int sort, string createby, string ImagePath) { string sql = "insert into menuinfo (menuname,path,parentid,sort,createby,createtime,image_path) values(@menuname,@path,@parentid,@sort,@createby,getdate(),@image_path)"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@menuname", menuname), new SqlParameter("@path", path), new SqlParameter("@parentid", parentid), new SqlParameter("@sort", sort), new SqlParameter("@createby", createby), new SqlParameter("@image_path", ImagePath) }; return(sqlconn.ExecuteSql(sql, param) > 0 ? true : false); }
public bool CompletedSendEmail(string queueNo) { string sql = @"update email_queue set active=1,compelete_time=GETDATE() where active = 0 and queue_no = '" + queueNo + "'"; return(test.ExecuteSql(sql) > 0?true:false); }
public bool InsertCommunicationLog(CommunicationLogs communicationLogs) { string sql = "insert into CommunicationLogs( rec_message, rec_time,res_message) values( @rec_message, @rec_time, @res_message)"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@rec_message", communicationLogs.rec_message), new SqlParameter("@rec_time", communicationLogs.rec_time), new SqlParameter("@res_message", communicationLogs.res_message) }; return(sqlconn.ExecuteSql(sql, param) > 0 ? true : false); }
/// <summary> /// 存储实时信息 /// </summary> /// <param name="productlog"></param> /// <returns></returns> public bool InsertProductlog(Productlog productlog) { string sql = "insert into Productlog( key_process, equipment, productno, result, contents, createtime) values( @key_process,@equipment,@productno,@result,@contents,@createtime)"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@key_process", productlog.key_process), new SqlParameter("@equipment", productlog.equipment), new SqlParameter("@productno", productlog.productno), new SqlParameter("@result", productlog.result), new SqlParameter("@contents", productlog.contents), new SqlParameter("@createtime", productlog.createtime), }; return(sqlconn.ExecuteSql(sql, param) > 0 ? true : false); }