Exemple #1
0
        public bool update(Model.systemcheckset systemchecksetmodel)
        {
            string contion   = string.Format("systemname='{0}'", systemchecksetmodel.systemname);
            string sql       = string.Format("id='{0}',count='{1}',arry='{2}',boundaryvalue='{3}',throwvalue='{4}',comment='{5}'", systemchecksetmodel.id, systemchecksetmodel.count, systemchecksetmodel.arry, systemchecksetmodel.boundaryvalue, systemchecksetmodel.throwvalue, systemchecksetmodel.comment);
            string tablename = typeof(systemcheckset).Name;

            return(ServerHelp.updateByWhere(tablename, _webip, contion, sql));
        }
Exemple #2
0
        public bool Update(borrow borrowmodel)
        {
            string tablename = typeof(borrow).Name;
            string strsql    = string.Format("WrenchID_id='{0}',borrowUser='******',borrowOperator='{2}',returnUser='******',returnOperator='{4}',borrowDate='{5}',returnDate='{6}',comment='{7}',is_return={8}", borrowmodel.WrenchID, borrowmodel.borrowUser, borrowmodel.borrowOperator, borrowmodel.returnUser, borrowmodel.returnOperator, borrowmodel.borrowDate, borrowmodel.returnDate, borrowmodel.comment, borrowmodel.is_return);
            string contation = string.Format("guid='{0}'", borrowmodel.guid);

            return(ServerHelp.updateByWhere(tablename, _webip, contation, strsql));
        }
Exemple #3
0
        public bool updata(Model.wrenchspecies species)
        {
            string tableName = typeof(wrenchspecies).Name;
            string sql       = string.Format("speciesName='{0}',speciesCode='{1}',parentSpecies='{3}',comment='{2}'", species.speciesName, species.speciesCode, species.comment, species.parentSpecies);
            string contion   = string.Format("guid='{0}'", species.guid);

            return(ServerHelp.updateByWhere(tableName, _webip, contion, sql));
        }
Exemple #4
0
        public bool Update(Model.department departmentmodel)
        {
            string tableName = typeof(department).Name;
            string contion   = string.Format("guid='{0}'", departmentmodel.guid);
            string sql       = string.Format("departmentName='{0}',parentDepartment='{1}',comment='{2}',delDepartment={3}", departmentmodel.departmentName, departmentmodel.parentDepartment, departmentmodel.comment, departmentmodel.delDepartment);

            return(ServerHelp.updateByWhere(tableName, _webIp, contion, sql));
        }
Exemple #5
0
        public bool update(Model.errorrangset errorrangsetmodel)
        {
            string tableName = typeof(errorrangset).Name;
            string sql       = string.Format("id='{0}',speciesID='{1}',rangmax='{2}',rangmin='{3}',unit='{4}',errorrangMax='{5}',comment='{6}',errorrangMin='{7}'", errorrangsetmodel.id, errorrangsetmodel.speciesID, errorrangsetmodel.rangmax, errorrangsetmodel.rangmin, errorrangsetmodel.unit, errorrangsetmodel.errorrangMax, errorrangsetmodel.comment, errorrangsetmodel.errorrangMin);
            string contion   = string.Format("id='{0}'", errorrangsetmodel.id);

            return(ServerHelp.updateByWhere(tableName, _webip, contion, sql));
        }
        public bool Update(Model.torquechecktarget torquechecktarget)
        {
            string tableName = typeof(torquechecktarget).Name;
            string contion   = string.Format("guid='{0}'", torquechecktarget.guid);
            string sql       = string.Format("wrenchID_id='{0}',checkDate='{1}',qaID='{2}',operatorID='{3}',torqueTargetValue='{4}',errorRangeMax='{5}',is_good='{6}',comment='{7}',errorRangeMin='{8}'", torquechecktarget.wrenchID, Convert.ToDateTime(torquechecktarget.checkDate), torquechecktarget.qaID, torquechecktarget.operatorID, torquechecktarget.torqueTargetValue, torquechecktarget.errorRangeMax, torquechecktarget.is_good?1:0, torquechecktarget.comment, torquechecktarget.errorRangeMin);

            return(ServerHelp.updateByWhere(tableName, _webip, contion, sql));
        }
Exemple #7
0
        public bool update(Model.wrenchstatus wrenchstatusmodel)
        {
            string tableName = typeof(wrenchstatus).Name;
            string contion   = string.Format("guid='{0}'", wrenchstatusmodel.guid);
            string sql       = string.Format("statusName='{0}',statusDM='{1}',comment='{2}'", wrenchstatusmodel.statusName, wrenchstatusmodel.statusDM, wrenchstatusmodel.comment);

            return(ServerHelp.updateByWhere(tableName, _webip, contion, sql));
        }
Exemple #8
0
        public bool update(Model.UserToRoleModel.usertorole usertorolemodel)
        {
            string sql       = string.Format("role_id='{0}'", usertorolemodel.role);
            string contion   = string.Format("user_id='{0}'", usertorolemodel.user);
            string tablename = typeof(QDDL.Model.UserToRoleModel.usertorole).Name;

            return(ServerHelp.updateByWhere(tablename, _webip, contion, sql));
        }
Exemple #9
0
        public bool Update(Model.duties duty)
        {
            string tableName = typeof(duties).Name;
            string contion   = string.Format("guid='{0}'", duty.guid);
            string sql       = string.Format("department_id='{0}',dutiesName='{1}',comment='{2}'", duty.department, duty.dutiesName, duty.comment);

            return(ServerHelp.updateByWhere(tableName, _webip, contion, sql));
        }
        public bool update(Model.borrowrecord borrowrecordmodel)
        {
            string tablename = typeof(borrowrecord).Name;
            string contion   = string.Format("guid='{0}'", borrowrecordmodel.guid);
            string strsql    = string.Format("WrenchID_id='{0}',returnDate='{1}',returnOperator='{2}',returnUser='******',is_return='{4}',comment='{5}'", borrowrecordmodel.WrenchID, borrowrecordmodel.returnDate = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), borrowrecordmodel.returnOperator, borrowrecordmodel.returnUser, borrowrecordmodel.is_return ?1:0, borrowrecordmodel.comment);

            return(ServerHelp.updateByWhere(tablename, _webip, contion, strsql));
        }
        public bool Update(role userrole)
        {
            // return ServerHelp.updateSingleInfo<role>(userrole.id ,userrole ,_webip );
            string tbname  = typeof(role).Name;
            string contion = string.Format("guid='{0}'", userrole.guid);
            string strsql  = string.Format("roleName='{0}',system_id='{1}',roleDM='{2}',comment='{3}' ", userrole.roleName, userrole.system, userrole.roleDM, userrole.comment);

            return(ServerHelp.updateByWhere(tbname, _webip, contion, strsql));
        }
        public bool Update(users user)
        {
            string tablename = typeof(users).Name;

            string strsql    = string.Format("username='******',password='******',is_staff={2},empID='{3}',cardID='{4}',phoneNumber='{5}',IDNum='{6}',mail='{7}',department_id='{8}',comment='{9}',is_superuser={10},duties_id='{11}'", user.username, user.password, user.is_staff, user.empID, user.cardID, user.phoneNumber, user.IDNum, user.mail, user.department, user.comment, user.is_superuser, user.duties);
            string contation = string.Format("guid='{0}'", user.guid);

            return(ServerHelp.updateByWhere(tablename, _webserviceip, contation, strsql));
        }
Exemple #13
0
        public bool updata(Model.wrench wrenchtool)
        {
            string tablename = typeof(wrench).Name;
            string contion   = string.Format("guid='{0}'", wrenchtool.guid);
            string updatestr = string.Format(
                "wrenchCode='{0}',wrenchBarCode='{1}',rangeMin='{2}',rangeMax='{3}',factory='{4}',species_id='{5}',status_id='{6}',comment='{7}',targetvalue='{8}',unit='{9}',isallowcheck={10},cycletime={11},createDate='{12}' , targetvalue1='{13}',targetvalue2='{14}' , lastrepair='{15}'", wrenchtool.wrenchCode
                , wrenchtool.wrenchBarCode, wrenchtool.rangeMin, wrenchtool.rangeMax, wrenchtool.factory, wrenchtool.species, wrenchtool.status, wrenchtool.comment, wrenchtool.targetvalue, wrenchtool.unit, wrenchtool.isallowcheck, wrenchtool.cycletime, wrenchtool.createDate, wrenchtool.targetvalue1, wrenchtool.targetvalue2, wrenchtool.lastrepair);

            return(ServerHelp.updateByWhere(tablename, _webip, contion, updatestr));
        }