コード例 #1
0
        public bool updateIformationByPoint(bean.deviceInformation di)
        {
            int    ret = 0;
            String sql = "update lb_device_information set pointX='" + di.pointX + "',pointY='" + di.pointY + "' where measureCode='" + di.measureCode + "' and meterNo='" + di.meterNo + "'";

            ret = DbHelperMySQL.ExecuteSql(sql);
            return(ret == 0 ? false : true);
        }
コード例 #2
0
        public bool updateAllIformationDao(bean.deviceInformation di)
        {
            int    ret = 0;
            String sql = "update lb_device_information set t_high='" + di.t_high + "',t_low='" + di.t_low + "',h_high='" + di.h_high + "',h_low='" + di.h_low + "',State=1 where 1=1";

            ret = DbHelperMySQL.ExecuteSql(sql);
            return(ret == 0 ? false : true);
        }
コード例 #3
0
        public bool queryDeviceBycode(bean.deviceInformation di)
        {
            int    ret = 0;
            String sql = "SELECT count(1) FROM lb_device_information where measureCode='" + di.measureCode + "' and meterNo='" + di.meterNo + "'";

            ret = DbHelperMySQL.ExecuteSql(sql);
            return(ret == -1 ? true : false);
        }
コード例 #4
0
        public bool deletetDeviceInformation(bean.deviceInformation di)
        {
            int    ret = 0;
            String sql = "delete from lb_device_information where measureCode='" + di.measureCode + "' and meterNo='" + di.meterNo + "'";

            ret = DbHelperMySQL.ExecuteSql(sql);
            return(ret == 0 ? false : true);
        }
コード例 #5
0
        public bool updateIformationDao(bean.deviceInformation di)
        {
            int    ret = 0;
            String sql = "";

            sql = "update lb_device_information set terminalname='" + di.terminalname + "',house_code='" + di.housecode + "',t_high='" + di.t_high + "',t_low='" + di.t_low + "',h_high='" + di.h_high + "',h_low='" + di.h_low + "',powerflag='" + di.powerflag + "',State=1 where measureCode='" + di.measureCode + "' and meterNo='" + di.meterNo + "'";
            ret = DbHelperMySQL.ExecuteSql(sql);
            return(ret == 0 ? false : true);
        }
コード例 #6
0
        public bool insertDeviceInformation(bean.deviceInformation di)
        {
            string id   = Result.GetNewId();
            int    flag = 0;
            string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            int    ret  = 0;
            String sql  = "insert into lb_device_information (id,measureCode,meterNo,terminalname,house_code,housetype,t_high,t_low,h_high,h_low,powerflag,createtime) values ('" + id + "','" + di.measureCode + "', '" + di.meterNo + "', '" + di.terminalname + "', '" + di.housecode + "','" + 0 + "', '" + di.t_high + "', '" + di.t_low + "', '" + di.h_high + "', '" + di.h_low + "', '" + flag + "', '" + time + "')";

            ret = DbHelperMySQL.ExecuteSql(sql);
            return(ret == 0 ? false : true);
        }
コード例 #7
0
 public bool updateAllIformation(bean.deviceInformation di)
 {
     return(deviceinfo.updateAllIformationDao(di));
 }
コード例 #8
0
 public bool updateIformationByPoint(bean.deviceInformation di)
 {
     return(deviceinfo.updateIformationByPoint(di));
 }
コード例 #9
0
 public bool deletetDeviceInformation(bean.deviceInformation di)
 {
     return(deviceinfo.deletetDeviceInformation(di));
 }
コード例 #10
0
 public bool queryDeviceBycode(bean.deviceInformation di)
 {
     return(deviceinfo.queryDeviceBycode(di));
 }
コード例 #11
0
 public bool insertDeviceInformation(bean.deviceInformation di)
 {
     return(deviceinfo.insertDeviceInformation(di));
 }