/// <summary> /// 更新一条数据,根据ID /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Update(Model.StationNetInfo model) { string strSql = "update StationNetInfo set NetName=@NetName, BuildTime=@BuildTime, Number=@Number, DistributionDiagram=@DistributionDiagram, IP=@IP, Port=@Port, SourceNode=@SourceNode, NetworkProtocol=@NetworkProtocol, ServiceContent=@ServiceContent, DataFormat=@DataFormat, SatelliteSystem=@SatelliteSystem where ID = " + model.ID.ToString(); SqlParameter NetName = new SqlParameter("NetName", SqlDbType.NVarChar); NetName.Value = model.NetName; SqlParameter BuildTime = new SqlParameter("BuildTime", SqlDbType.DateTime); BuildTime.Value = model.BuildTime; SqlParameter Number = new SqlParameter("Number", SqlDbType.NVarChar); Number.Value = model.Number; SqlParameter DistributionDiagram = new SqlParameter("DistributionDiagram", SqlDbType.NVarChar); DistributionDiagram.Value = model.DistributionDiagram; SqlParameter IP = new SqlParameter("IP", SqlDbType.NVarChar); IP.Value = model.IP; SqlParameter Port = new SqlParameter("Port", SqlDbType.NVarChar); Port.Value = model.Port; SqlParameter SourceNode = new SqlParameter("SourceNode", SqlDbType.NVarChar); SourceNode.Value = model.SourceNode; SqlParameter NetworkProtocol = new SqlParameter("NetworkProtocol", SqlDbType.NVarChar); NetworkProtocol.Value = model.NetworkProtocol; SqlParameter ServiceContent = new SqlParameter("ServiceContent", SqlDbType.NVarChar); ServiceContent.Value = model.ServiceContent; SqlParameter DataFormat = new SqlParameter("DataFormat", SqlDbType.NVarChar); DataFormat.Value = model.DataFormat; SqlParameter SatelliteSystem = new SqlParameter("SatelliteSystem", SqlDbType.NVarChar); SatelliteSystem.Value = model.SatelliteSystem; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { NetName, BuildTime, Number, DistributionDiagram, IP, Port, SourceNode, NetworkProtocol, ServiceContent, DataFormat, SatelliteSystem }, connectionString) == 1 ? true : false); }
/// <summary> /// 更新一条数据,根据ID /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Update(Model.RTKUserInfo model) { string strSql = "update RTKUserInfo set UserName=@UserName, PassWord=@PassWord, Contact=@Contact, ContactPhone=@ContactPhone, ContactEmail=@ContactEmail, ContactQQ=@ContactQQ, CORSCardNum=@CORSCardNum, ReceiverNum=@ReceiverNum, Company=@Company, RegTime=@RegTime, UserType=@UserType where ID = " + model.ID.ToString(); SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter PassWord = new SqlParameter("PassWord", SqlDbType.NVarChar); PassWord.Value = model.PassWord; SqlParameter Contact = new SqlParameter("Contact", SqlDbType.NVarChar); Contact.Value = model.Contact; SqlParameter ContactPhone = new SqlParameter("ContactPhone", SqlDbType.NVarChar); ContactPhone.Value = model.ContactPhone; SqlParameter ContactEmail = new SqlParameter("ContactEmail", SqlDbType.NVarChar); ContactEmail.Value = model.ContactEmail; SqlParameter ContactQQ = new SqlParameter("ContactQQ", SqlDbType.NVarChar); ContactQQ.Value = model.ContactQQ; SqlParameter CORSCardNum = new SqlParameter("CORSCardNum", SqlDbType.NVarChar); CORSCardNum.Value = model.CORSCardNum; SqlParameter ReceiverNum = new SqlParameter("ReceiverNum", SqlDbType.NVarChar); ReceiverNum.Value = model.ReceiverNum; SqlParameter Company = new SqlParameter("Company", SqlDbType.NVarChar); Company.Value = model.Company; SqlParameter RegTime = new SqlParameter("RegTime", SqlDbType.DateTime); RegTime.Value = model.RegTime; SqlParameter UserType = new SqlParameter("UserType", SqlDbType.Int); UserType.Value = model.UserType; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, PassWord, Contact, ContactPhone, ContactEmail, ContactQQ, CORSCardNum, ReceiverNum, Company, RegTime, UserType }, connectionString) == 1 ? true : false); }
/// <summary> /// 更新一条数据,根据ID /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Update(Model.RegisterUser model) { string strSql = "update RegisterUser set UserName=@UserName, PassWord=@PassWord, Email=@Email, Phone=@Phone, RegTime=@RegTime, LastLoginTime=@LastLoginTime, TryLoginTimes=@TryLoginTimes, CertifiationStatus=@CertifiationStatus, CertifiationIndex=@CertifiationIndex, UserType=@UserType, IsEnable=@IsEnable where ID = " + model.ID.ToString(); SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter PassWord = new SqlParameter("PassWord", SqlDbType.NVarChar); PassWord.Value = model.PassWord; SqlParameter Email = new SqlParameter("Email", SqlDbType.NVarChar); Email.Value = model.Email; SqlParameter Phone = new SqlParameter("Phone", SqlDbType.NVarChar); Phone.Value = model.Phone; SqlParameter RegTime = new SqlParameter("RegTime", SqlDbType.DateTime); RegTime.Value = model.RegTime; SqlParameter LastLoginTime = new SqlParameter("LastLoginTime", SqlDbType.DateTime); LastLoginTime.Value = model.LastLoginTime; SqlParameter TryLoginTimes = new SqlParameter("TryLoginTimes", SqlDbType.Int); TryLoginTimes.Value = model.TryLoginTimes; SqlParameter CertifiationStatus = new SqlParameter("CertifiationStatus", SqlDbType.Int); CertifiationStatus.Value = model.CertifiationStatus; SqlParameter CertifiationIndex = new SqlParameter("CertifiationIndex", SqlDbType.NVarChar); CertifiationIndex.Value = model.CertifiationIndex; SqlParameter UserType = new SqlParameter("UserType", SqlDbType.Int); UserType.Value = model.UserType; SqlParameter IsEnable = new SqlParameter("IsEnable", SqlDbType.Int); IsEnable.Value = model.IsEnable; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, PassWord, Email, Phone, RegTime, LastLoginTime, TryLoginTimes, CertifiationStatus, CertifiationIndex, UserType, IsEnable }, connectionString) == 1 ? true : false); }
/// <summary> /// 更新一条数据,根据ID /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Update(Model.RTKUserPurview model) { string strSql = "update RTKUserPurview set UserName=@UserName, VRSEnable=@VRSEnable, StartTime=@StartTime, EndTime=@EndTime, ServerType=@ServerType, SourceTable=@SourceTable, AreaID=@AreaID, CoorSystem=@CoorSystem, ElevationEnable=@ElevationEnable, ElevationMode=@ElevationMode, RoamingServiceEnable=@RoamingServiceEnable, RoamingServiceArea=@RoamingServiceArea where ID = " + model.ID.ToString(); SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter VRSEnable = new SqlParameter("VRSEnable", SqlDbType.Int); VRSEnable.Value = model.VRSEnable; SqlParameter StartTime = new SqlParameter("StartTime", SqlDbType.DateTime); StartTime.Value = model.StartTime; SqlParameter EndTime = new SqlParameter("EndTime", SqlDbType.DateTime); EndTime.Value = model.EndTime; SqlParameter ServerType = new SqlParameter("ServerType", SqlDbType.NVarChar); ServerType.Value = model.ServerType; SqlParameter SourceTable = new SqlParameter("SourceTable", SqlDbType.NVarChar); SourceTable.Value = model.SourceTable; SqlParameter AreaID = new SqlParameter("AreaID", SqlDbType.NVarChar); AreaID.Value = model.AreaID; SqlParameter CoorSystem = new SqlParameter("CoorSystem", SqlDbType.NVarChar); CoorSystem.Value = model.CoorSystem; SqlParameter ElevationEnable = new SqlParameter("ElevationEnable", SqlDbType.Int); ElevationEnable.Value = model.ElevationEnable; SqlParameter ElevationMode = new SqlParameter("ElevationMode", SqlDbType.NVarChar); ElevationMode.Value = model.ElevationMode; SqlParameter RoamingServiceEnable = new SqlParameter("RoamingServiceEnable", SqlDbType.Int); RoamingServiceEnable.Value = model.RoamingServiceEnable; SqlParameter RoamingServiceArea = new SqlParameter("RoamingServiceArea", SqlDbType.NVarChar); RoamingServiceArea.Value = model.RoamingServiceArea; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, VRSEnable, StartTime, EndTime, ServerType, SourceTable, AreaID, CoorSystem, ElevationEnable, ElevationMode, RoamingServiceEnable, RoamingServiceArea }, connectionString) == 1 ? true : false); }
/// <summary> /// 更新一条数据,根据ID /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Update(Model.InvoiceList model) { string strSql = "update InvoiceList set UserName=@UserName, OrderNumber=@OrderNumber, OrderDetail=@OrderDetail, Price=@Price, SubmitTime=@SubmitTime, DealTime=@DealTime, PayTime=@PayTime, Status=@Status, InvoiceInfoIndex=@InvoiceInfoIndex, InvoiceType=@InvoiceType, IssueType=@IssueType, InvoiceFile=@InvoiceFile where ID = " + model.ID.ToString(); SqlParameter OrderNumber = new SqlParameter("OrderNumber", SqlDbType.NVarChar); OrderNumber.Value = model.OrderNumber; SqlParameter OrderDetail = new SqlParameter("OrderDetail", SqlDbType.NVarChar); OrderDetail.Value = model.OrderDetail; SqlParameter Price = new SqlParameter("Price", SqlDbType.NVarChar); Price.Value = model.Price; SqlParameter SubmitTime = new SqlParameter("SubmitTime", SqlDbType.DateTime); SubmitTime.Value = model.SubmitTime; SqlParameter DealTime = new SqlParameter("DealTime", SqlDbType.DateTime); DealTime.Value = model.DealTime; SqlParameter PayTime = new SqlParameter("PayTime", SqlDbType.DateTime); PayTime.Value = model.PayTime; SqlParameter Status = new SqlParameter("Status", SqlDbType.Int); Status.Value = model.Status; SqlParameter InvoiceInfoIndex = new SqlParameter("InvoiceInfoIndex", SqlDbType.NVarChar); InvoiceInfoIndex.Value = model.InvoiceInfoIndex; SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter InvoiceType = new SqlParameter("InvoiceType", SqlDbType.Int); InvoiceType.Value = model.InvoiceType; SqlParameter IssueType = new SqlParameter("IssueType", SqlDbType.Int); IssueType.Value = model.IssueType; SqlParameter InvoiceFile = new SqlParameter("InvoiceFile", SqlDbType.NVarChar); InvoiceFile.Value = model.InvoiceFile; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, OrderNumber, OrderDetail, Price, SubmitTime, DealTime, PayTime, Status, InvoiceInfoIndex, InvoiceType, IssueType, InvoiceFile }, connectionString) == 1 ? true : false); }
/// <summary> /// 增加一个用户信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Add(Model.RegisterUser model) { string strSql = "insert into RegisterUser(UserName,PassWord,Email,Phone,RegTime,LastLoginTime,TryLoginTimes,CertifiationStatus,CertifiationIndex,UserType,IsEnable,BelongArea) values(@UserName,@PassWord,@Email,@Phone,@RegTime,@LastLoginTime,@TryLoginTimes,@CertifiationStatus,@CertifiationIndex,@UserType,@IsEnable,@BelongArea)"; SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter PassWord = new SqlParameter("PassWord", SqlDbType.NVarChar); PassWord.Value = model.PassWord; SqlParameter Email = new SqlParameter("Email", SqlDbType.NVarChar); Email.Value = model.Email; SqlParameter Phone = new SqlParameter("Phone", SqlDbType.NVarChar); Phone.Value = model.Phone; SqlParameter RegTime = new SqlParameter("RegTime", SqlDbType.DateTime); RegTime.Value = model.RegTime; SqlParameter LastLoginTime = new SqlParameter("LastLoginTime", SqlDbType.DateTime); LastLoginTime.Value = model.LastLoginTime; SqlParameter TryLoginTimes = new SqlParameter("TryLoginTimes", SqlDbType.Int); TryLoginTimes.Value = model.TryLoginTimes; SqlParameter CertifiationStatus = new SqlParameter("CertifiationStatus", SqlDbType.Int); CertifiationStatus.Value = model.CertifiationStatus; SqlParameter CertifiationIndex = new SqlParameter("CertifiationIndex", SqlDbType.NVarChar); CertifiationIndex.Value = model.CertifiationIndex; SqlParameter UserType = new SqlParameter("UserType", SqlDbType.Int); UserType.Value = model.UserType; SqlParameter IsEnable = new SqlParameter("IsEnable", SqlDbType.Int); IsEnable.Value = model.IsEnable; SqlParameter BelongArea = new SqlParameter("BelongArea", SqlDbType.NVarChar); BelongArea.Value = model.BelongArea; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, PassWord, Email, Phone, RegTime, LastLoginTime, TryLoginTimes, CertifiationStatus, CertifiationIndex, UserType, IsEnable, BelongArea }, connectionString) == 1 ? true : false); }
/// <summary> /// 增加一个用户信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Add(Model.RTKUserPurview model) { string strSql = "insert into RTKUserPurview( UserName, VRSEnable, StartTime, EndTime, ServerType, SourceTable, AreaID, CoorSystem, ElevationEnable, ElevationMode, RoamingServiceEnable, RoamingServiceArea,RoamID) values( @UserName, @VRSEnable, @StartTime, @EndTime, @ServerType, @SourceTable, @AreaID, @CoorSystem, @ElevationEnable, @ElevationMode, @RoamingServiceEnable, @RoamingServiceArea ,@RoamID)"; SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter VRSEnable = new SqlParameter("VRSEnable", SqlDbType.Int); VRSEnable.Value = model.VRSEnable; SqlParameter StartTime = new SqlParameter("StartTime", SqlDbType.DateTime); StartTime.Value = model.StartTime; SqlParameter EndTime = new SqlParameter("EndTime", SqlDbType.DateTime); EndTime.Value = model.EndTime; SqlParameter ServerType = new SqlParameter("ServerType", SqlDbType.NVarChar); ServerType.Value = model.ServerType; SqlParameter SourceTable = new SqlParameter("SourceTable", SqlDbType.NVarChar); SourceTable.Value = model.SourceTable; SqlParameter AreaID = new SqlParameter("AreaID", SqlDbType.NVarChar); AreaID.Value = model.AreaID; SqlParameter CoorSystem = new SqlParameter("CoorSystem", SqlDbType.NVarChar); CoorSystem.Value = model.CoorSystem; SqlParameter ElevationEnable = new SqlParameter("ElevationEnable", SqlDbType.Int); ElevationEnable.Value = model.ElevationEnable; SqlParameter ElevationMode = new SqlParameter("ElevationMode", SqlDbType.NVarChar); ElevationMode.Value = model.ElevationMode; SqlParameter RoamingServiceEnable = new SqlParameter("RoamingServiceEnable", SqlDbType.Int); RoamingServiceEnable.Value = model.RoamingServiceEnable; SqlParameter RoamingServiceArea = new SqlParameter("RoamingServiceArea", SqlDbType.NVarChar); RoamingServiceArea.Value = model.RoamingServiceArea; SqlParameter RoamID = new SqlParameter("RoamID", SqlDbType.NVarChar); RoamID.Value = model.RoamID; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, VRSEnable, StartTime, EndTime, ServerType, SourceTable, AreaID, CoorSystem, ElevationEnable, ElevationMode, RoamingServiceEnable, RoamingServiceArea, RoamID }, connectionString) == 1 ? true : false); }
/// <summary> /// 增加一个单位信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Add(Model.ContractApplication model) { string strSql = "insert into ContractApplication(ID,UserName,Contacts,Phone,Address,Price,ContractFile,Type,ApplicationTime,Remark) values(@ID,@UserName,@Contacts,@Phone,@Address,@Price,@ContractFile,@Type,@ApplicationTime,@Remark)"; SqlParameter ID = new SqlParameter("ID", SqlDbType.NVarChar); ID.Value = model.ID; SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter Contacts = new SqlParameter("Contacts", SqlDbType.NVarChar); Contacts.Value = model.Contacts; SqlParameter Phone = new SqlParameter("Phone", SqlDbType.NVarChar); Phone.Value = model.Phone; SqlParameter Address = new SqlParameter("Address", SqlDbType.NVarChar); Address.Value = model.Address; SqlParameter Price = new SqlParameter("Price", SqlDbType.NVarChar); Price.Value = model.Price; SqlParameter ContractFile = new SqlParameter("ContractFile", SqlDbType.NVarChar); ContractFile.Value = model.ContractFile; SqlParameter Type = new SqlParameter("Type", SqlDbType.NVarChar); Type.Value = model.Type; SqlParameter ApplicationTime = new SqlParameter("ApplicationTime", SqlDbType.NVarChar); ApplicationTime.Value = model.ApplicationTime; SqlParameter Remark = new SqlParameter("Remark", SqlDbType.NVarChar); Remark.Value = model.Remark; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { ID, UserName, Contacts, Phone, Address, Price, ContractFile, Type, ApplicationTime, Remark }, connectionString) == 1 ? true : false); }
public static bool Update(Model.GDCoorSysXYZ model) { model.X = model.X + 3242.23; model.Y = model.Y - 23423.2; model.Z = model.Z - 34.3; model.aa += 12.324; model.bb += 6.654; model.cc += 1.545; string strSql = "update GDCoorSysXYZ set X=@X, Y=@Y, Z=@Z,aa=@aa,bb=@bb,cc=@cc,YSZBXM=@YSZBXM,MDZBXM=@MDZBXM where ID = " + model.ID.ToString(); SqlParameter X = new SqlParameter("X", SqlDbType.NVarChar); X.Value = AES.AESEncrypt(model.X.ToString()); SqlParameter Y = new SqlParameter("Y", SqlDbType.NVarChar); Y.Value = AES.AESEncrypt(model.Y.ToString()); SqlParameter Z = new SqlParameter("Z", SqlDbType.NVarChar); Z.Value = AES.AESEncrypt(model.Z.ToString()); SqlParameter aa = new SqlParameter("aa", SqlDbType.NVarChar); aa.Value = AES.AESEncrypt(model.aa.ToString()); SqlParameter bb = new SqlParameter("bb", SqlDbType.NVarChar); bb.Value = AES.AESEncrypt(model.bb.ToString()); SqlParameter cc = new SqlParameter("cc", SqlDbType.NVarChar); cc.Value = AES.AESEncrypt(model.cc.ToString()); SqlParameter YSZBXM = new SqlParameter("YSZBXM", SqlDbType.NVarChar); YSZBXM.Value = model.YSZBXM.ToString(); SqlParameter MDZBXM = new SqlParameter("MDZBXM", SqlDbType.NVarChar); MDZBXM.Value = model.MDZBXM.ToString(); return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { X, Y, Z, aa, bb, cc, YSZBXM, MDZBXM }, connectionString) == 1 ? true : false); }
/// <summary> /// 更新一条数据,根据ID /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Update(Model.DataCenter model) { string strSql = "update DataCenter set DeviceType=@DeviceType,Type=@Type,SerialNumber=@SerialNumber,FirstUseDate=@FirstUseDate,LoginName=@LoginName,Password=@Password,Business=@Business,IP=@IP,SubnetMask=@SubnetMask,Gateway=@Gateway,Port=@Port,MaintenanceTime=@MaintenanceTime,MaintenanceContent=@MaintenanceContent,MaintenancePerson=@MaintenancePerson where ID = " + model.ID.ToString(); SqlParameter DeviceType = new SqlParameter("DeviceType", SqlDbType.NVarChar); DeviceType.Value = model.DeviceType; SqlParameter Type = new SqlParameter("Type", SqlDbType.NVarChar); Type.Value = model.Type; SqlParameter SerialNumber = new SqlParameter("SerialNumber", SqlDbType.NVarChar); SerialNumber.Value = model.SerialNumber; SqlParameter FirstUseDate = new SqlParameter("FirstUseDate", SqlDbType.DateTime); FirstUseDate.Value = model.FirstUseDate; SqlParameter LoginName = new SqlParameter("LoginName", SqlDbType.NVarChar); LoginName.Value = model.LoginName; SqlParameter Password = new SqlParameter("Password", SqlDbType.NVarChar); Password.Value = model.Password; SqlParameter Business = new SqlParameter("Business", SqlDbType.NVarChar); Business.Value = model.Business; SqlParameter IP = new SqlParameter("IP", SqlDbType.NVarChar); IP.Value = model.IP; SqlParameter SubnetMask = new SqlParameter("SubnetMask", SqlDbType.NVarChar); SubnetMask.Value = model.SubnetMask; SqlParameter Gateway = new SqlParameter("Gateway", SqlDbType.NVarChar); Gateway.Value = model.Gateway; SqlParameter Port = new SqlParameter("Port", SqlDbType.NVarChar); Port.Value = model.Port; SqlParameter MaintenanceTime = new SqlParameter("MaintenanceTime", SqlDbType.DateTime); MaintenanceTime.Value = model.MaintenanceTime; SqlParameter MaintenanceContent = new SqlParameter("MaintenanceContent", SqlDbType.NVarChar); MaintenanceContent.Value = model.MaintenanceContent; SqlParameter MaintenancePerson = new SqlParameter("MaintenancePerson", SqlDbType.NVarChar); MaintenancePerson.Value = model.MaintenancePerson; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { DeviceType, Type, SerialNumber, FirstUseDate, LoginName, Password, Business, IP, SubnetMask, Gateway, Port, MaintenanceTime, MaintenanceContent, MaintenancePerson }, connectionString) == 1 ? true : false); }
/// <summary> /// 增加一个用户信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Add(Model.RTKUserInfo model) { string strSql = "insert into RTKUserInfo( UserName, PassWord, Contact, ContactPhone, ContactEmail, ContactQQ, CORSCardNum, ReceiverNum, Company, RegTime, UserType,OrderNumber,BelongArea,RegisterUserName ) values( @UserName, @PassWord, @Contact, @ContactPhone, @ContactEmail, @ContactQQ, @CORSCardNum, @ReceiverNum, @Company, @RegTime, @UserType,@OrderNumber,@BelongArea,@RegisterUserName )"; SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter PassWord = new SqlParameter("PassWord", SqlDbType.NVarChar); PassWord.Value = model.PassWord; SqlParameter Contact = new SqlParameter("Contact", SqlDbType.NVarChar); Contact.Value = model.Contact; SqlParameter ContactPhone = new SqlParameter("ContactPhone", SqlDbType.NVarChar); ContactPhone.Value = model.ContactPhone; SqlParameter ContactEmail = new SqlParameter("ContactEmail", SqlDbType.NVarChar); ContactEmail.Value = model.ContactEmail; SqlParameter ContactQQ = new SqlParameter("ContactQQ", SqlDbType.NVarChar); ContactQQ.Value = model.ContactQQ; SqlParameter CORSCardNum = new SqlParameter("CORSCardNum", SqlDbType.NVarChar); CORSCardNum.Value = model.CORSCardNum; SqlParameter ReceiverNum = new SqlParameter("ReceiverNum", SqlDbType.NVarChar); ReceiverNum.Value = model.ReceiverNum; SqlParameter Company = new SqlParameter("Company", SqlDbType.NVarChar); Company.Value = model.Company; SqlParameter RegTime = new SqlParameter("RegTime", SqlDbType.DateTime); RegTime.Value = model.RegTime; SqlParameter UserType = new SqlParameter("UserType", SqlDbType.Int); UserType.Value = model.UserType; SqlParameter OrderNumber = new SqlParameter("OrderNumber", SqlDbType.NVarChar); OrderNumber.Value = model.OrderNumber; SqlParameter BelongArea = new SqlParameter("BelongArea", SqlDbType.NVarChar); BelongArea.Value = model.BelongArea; SqlParameter RegisterUserName = new SqlParameter("RegisterUserName", SqlDbType.NVarChar); RegisterUserName.Value = model.RegisterUserName; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, PassWord, Contact, ContactPhone, ContactEmail, ContactQQ, CORSCardNum, ReceiverNum, Company, RegTime, UserType, OrderNumber, BelongArea, RegisterUserName }, connectionString) == 1 ? true : false); }
/// <summary> /// 增加一个用户信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Add(Model.InvoiceList model) { string strSql = "insert into InvoiceList( UserName, OrderNumber, OrderDetail, Price, SubmitTime, DealTime, PayTime, Status, InvoiceInfoIndex, InvoiceType, IssueType, InvoiceFile,ContractFile,ContractStatus,BelongArea) values( @UserName, @OrderNumber, @OrderDetail, @Price, @SubmitTime, @DealTime, @PayTime, @Status, @InvoiceInfoIndex, @InvoiceType, @IssueType, @InvoiceFile,@ContractFile,@ContractStatus,@BelongArea) "; SqlParameter OrderNumber = new SqlParameter("OrderNumber", SqlDbType.NVarChar); OrderNumber.Value = model.OrderNumber; SqlParameter OrderDetail = new SqlParameter("OrderDetail", SqlDbType.NVarChar); OrderDetail.Value = model.OrderDetail; SqlParameter Price = new SqlParameter("Price", SqlDbType.NVarChar); Price.Value = model.Price; SqlParameter SubmitTime = new SqlParameter("SubmitTime", SqlDbType.DateTime); SubmitTime.Value = model.SubmitTime; SqlParameter DealTime = new SqlParameter("DealTime", SqlDbType.DateTime); DealTime.Value = model.DealTime; SqlParameter PayTime = new SqlParameter("PayTime", SqlDbType.DateTime); PayTime.Value = model.PayTime; SqlParameter Status = new SqlParameter("Status", SqlDbType.Int); Status.Value = model.Status; SqlParameter InvoiceInfoIndex = new SqlParameter("InvoiceInfoIndex", SqlDbType.NVarChar); InvoiceInfoIndex.Value = model.InvoiceInfoIndex; SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter InvoiceType = new SqlParameter("InvoiceType", SqlDbType.Int); InvoiceType.Value = model.InvoiceType; SqlParameter IssueType = new SqlParameter("IssueType", SqlDbType.Int); IssueType.Value = model.IssueType; SqlParameter InvoiceFile = new SqlParameter("InvoiceFile", SqlDbType.NVarChar); InvoiceFile.Value = model.InvoiceFile; SqlParameter ContractFile = new SqlParameter("ContractFile", SqlDbType.NVarChar); ContractFile.Value = model.ContractFile; SqlParameter ContractStatus = new SqlParameter("ContractStatus", SqlDbType.Int); ContractStatus.Value = model.ContractStatus; SqlParameter BelongArea = new SqlParameter("BelongArea", SqlDbType.NVarChar); BelongArea.Value = model.BelongArea; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, OrderNumber, OrderDetail, Price, SubmitTime, DealTime, PayTime, Status, InvoiceInfoIndex, InvoiceType, IssueType, InvoiceFile, ContractFile, ContractStatus, BelongArea }, connectionString) == 1 ? true : false); }
/// <summary> /// 增加一个用户信息 /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Add(Model.OrderList model) { string strSql = "insert into OrderList( UserName, OrderNumber, SubmitTime, OrderStatus, WorkArea, ServerType, CoorTransEnable, HeightTransEnable, SHPTransEnable, DXFTransEnable, PPPserverEnable, ObsQualityEnable, BaseLineEnable, MultiBaseLineEnable, CoorSystemEnable, RoamingServiceArea, RoamingServiceEnable, AccountNum, ServiceDuration, Price, Dealer, DealTime, PayMethod, TransferCertificate, PayTime,RoamID,company,OrderContent,OrdeType,ElevationEnable,IsRenew) values( @UserName, @OrderNumber, @SubmitTime, @OrderStatus, @WorkArea, @ServerType, @CoorTransEnable, @HeightTransEnable, @SHPTransEnable, @DXFTransEnable, @PPPserverEnable, @ObsQualityEnable, @BaseLineEnable, @MultiBaseLineEnable, @CoorSystemEnable, @RoamingServiceArea, @RoamingServiceEnable, @AccountNum, @ServiceDuration, @Price, @Dealer, @DealTime, @PayMethod, @TransferCertificate, @PayTime,@RoamID,@company,@OrderContent,@OrdeType,@ElevationEnable,@IsRenew)"; SqlParameter UserName = new SqlParameter("UserName", SqlDbType.NVarChar); UserName.Value = model.UserName; SqlParameter OrderNumber = new SqlParameter("OrderNumber", SqlDbType.NVarChar); OrderNumber.Value = model.OrderNumber; SqlParameter SubmitTime = new SqlParameter("SubmitTime", SqlDbType.DateTime); SubmitTime.Value = model.SubmitTime; SqlParameter OrderStatus = new SqlParameter("OrderStatus", SqlDbType.Int); OrderStatus.Value = model.OrderStatus; SqlParameter WorkArea = new SqlParameter("WorkArea", SqlDbType.NVarChar); WorkArea.Value = model.WorkArea; SqlParameter ServerType = new SqlParameter("ServerType", SqlDbType.NVarChar); ServerType.Value = model.ServerType; SqlParameter CoorTransEnable = new SqlParameter("CoorTransEnable", SqlDbType.Int); CoorTransEnable.Value = model.CoorTransEnable; SqlParameter HeightTransEnable = new SqlParameter("HeightTransEnable", SqlDbType.Int); HeightTransEnable.Value = model.HeightTransEnable; SqlParameter SHPTransEnable = new SqlParameter("SHPTransEnable", SqlDbType.Int); SHPTransEnable.Value = model.SHPTransEnable; SqlParameter DXFTransEnable = new SqlParameter("DXFTransEnable", SqlDbType.Int); DXFTransEnable.Value = model.DXFTransEnable; SqlParameter PPPserverEnable = new SqlParameter("PPPserverEnable", SqlDbType.Int); PPPserverEnable.Value = model.PPPserverEnable; SqlParameter ObsQualityEnable = new SqlParameter("ObsQualityEnable", SqlDbType.Int); ObsQualityEnable.Value = model.ObsQualityEnable; SqlParameter BaseLineEnable = new SqlParameter("BaseLineEnable", SqlDbType.Int); BaseLineEnable.Value = model.BaseLineEnable; SqlParameter MultiBaseLineEnable = new SqlParameter("MultiBaseLineEnable", SqlDbType.Int); MultiBaseLineEnable.Value = model.MultiBaseLineEnable; SqlParameter CoorSystemEnable = new SqlParameter("CoorSystemEnable", SqlDbType.Int); CoorSystemEnable.Value = model.CoorSystemEnable; SqlParameter RoamingServiceEnable = new SqlParameter("RoamingServiceEnable", SqlDbType.Int); RoamingServiceEnable.Value = model.RoamingServiceEnable; SqlParameter RoamingServiceArea = new SqlParameter("RoamingServiceArea", SqlDbType.NVarChar); RoamingServiceArea.Value = model.RoamingServiceArea; SqlParameter AccountNum = new SqlParameter("AccountNum", SqlDbType.Int); AccountNum.Value = model.AccountNum; SqlParameter ServiceDuration = new SqlParameter("ServiceDuration", SqlDbType.NVarChar); ServiceDuration.Value = model.ServiceDuration; SqlParameter Price = new SqlParameter("Price", SqlDbType.NVarChar); Price.Value = model.Price; SqlParameter Dealer = new SqlParameter("Dealer", SqlDbType.NVarChar); Dealer.Value = model.Dealer; SqlParameter DealTime = new SqlParameter("DealTime", SqlDbType.DateTime); DealTime.Value = model.DealTime; SqlParameter PayTime = new SqlParameter("PayTime", SqlDbType.DateTime); PayTime.Value = model.PayTime; SqlParameter TransferCertificate = new SqlParameter("TransferCertificate", SqlDbType.NVarChar); TransferCertificate.Value = model.TransferCertificate; SqlParameter PayMethod = new SqlParameter("PayMethod", SqlDbType.NVarChar); PayMethod.Value = model.PayMethod; SqlParameter RoamID = new SqlParameter("RoamID", SqlDbType.NVarChar); RoamID.Value = model.RoamID; SqlParameter company = new SqlParameter("company", SqlDbType.NVarChar); company.Value = model.company; SqlParameter OrderContent = new SqlParameter("OrderContent", SqlDbType.NVarChar); OrderContent.Value = model.OrderContent; SqlParameter OrdeType = new SqlParameter("OrdeType", SqlDbType.NVarChar); OrdeType.Value = model.OrdeType; SqlParameter ElevationEnable = new SqlParameter("ElevationEnable", SqlDbType.NVarChar); ElevationEnable.Value = model.ElevationEnable; SqlParameter IsRenew = new SqlParameter("IsRenew", SqlDbType.NVarChar); IsRenew.Value = model.IsRenew; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { UserName, OrderNumber, SubmitTime, OrderStatus, WorkArea, ServerType, CoorTransEnable, HeightTransEnable, SHPTransEnable, DXFTransEnable, PPPserverEnable, ObsQualityEnable, BaseLineEnable, MultiBaseLineEnable, CoorSystemEnable, RoamingServiceArea, RoamingServiceEnable, AccountNum, ServiceDuration, Price, Dealer, DealTime, PayMethod, TransferCertificate, PayTime, RoamID, company, OrderContent, OrdeType, ElevationEnable, IsRenew }, connectionString) == 1 ? true : false); }
/// <summary> /// 添加一条新闻到数据库中 /// </summary> /// <returns></returns> public static bool Add(Model.ResourcesDownload rd) { string strSql = "insert into ResourcesDownload(ResourceName,ResourcePath,DownloadTimes,UploadUser,UploadTime,IsDeleted,Remark) values(@ResourceName,@ResourcePath,@DownloadTimes,@UploadUser,@UploadTime,@IsDeleted,@Remark)"; SqlParameter ResourceName = new SqlParameter("@ResourceName", SqlDbType.NVarChar, 50); ResourceName.Value = rd.ResourceName; SqlParameter ResourcePath = new SqlParameter("@ResourcePath", SqlDbType.NVarChar, 500); ResourcePath.Value = rd.ResourcePath; SqlParameter DownloadTimes = new SqlParameter("@DownloadTimes", SqlDbType.Int); DownloadTimes.Value = rd.DownloadTimes; SqlParameter UploadUser = new SqlParameter("@UploadUser", SqlDbType.VarChar, 50); UploadUser.Value = rd.UploadUser; SqlParameter UploadTime = new SqlParameter("@UploadTime", SqlDbType.DateTime); UploadTime.Value = rd.UploadTime; SqlParameter IsDeleted = new SqlParameter("@IsDeleted", SqlDbType.Bit); IsDeleted.Value = rd.IsDeleted; SqlParameter Remark = new SqlParameter("@Remark", SqlDbType.NVarChar, 500); Remark.Value = rd.Remark; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { ResourceName, ResourcePath, DownloadTimes, UploadUser, UploadTime, IsDeleted, Remark }, connectionString) == 1 ? true : false); }
/// <summary> /// 更新一条数据,根据ID /// </summary> /// <param name="model"></param> /// <returns></returns> public static bool Update(Model.CompanyInfo model) { string strSql = "update CompanyInfo set Company=@Company, Address=@Address, CompanyTel=@CompanyTel, Industry=@Industry, OrganizationCode=@OrganizationCode, BusinessLicense=@BusinessLicense, SurveyingQualification=@SurveyingQualification, SurveyingNumber=@SurveyingNumber, SurveyingFile=@SurveyingFile, LegalPerson=@LegalPerson, LegalIDCardNumber=@LegalIDCardNumber, LegalIDCardFile=@LegalIDCardFile, PowerOfAttorney=@PowerOfAttorney, Contact=@Contact, ContactIDCardNumer=@ContactIDCardNumer, ContactIDCardFile=@ContactIDCardFile, CertificationTime=@CertificationTime, BelongArea=@BelongArea where ID = " + model.ID.ToString(); SqlParameter Company = new SqlParameter("Company", SqlDbType.NVarChar); Company.Value = model.Company; SqlParameter Address = new SqlParameter("Address", SqlDbType.NVarChar); Address.Value = model.Address; SqlParameter CompanyTel = new SqlParameter("CompanyTel", SqlDbType.NVarChar); CompanyTel.Value = model.CompanyTel; SqlParameter Industry = new SqlParameter("Industry", SqlDbType.NVarChar); Industry.Value = model.Industry; SqlParameter OrganizationCode = new SqlParameter("OrganizationCode", SqlDbType.NVarChar); OrganizationCode.Value = model.OrganizationCode; SqlParameter BusinessLicense = new SqlParameter("BusinessLicense", SqlDbType.NVarChar); BusinessLicense.Value = model.BusinessLicense; SqlParameter SurveyingQualification = new SqlParameter("SurveyingQualification", SqlDbType.NVarChar); SurveyingQualification.Value = model.SurveyingQualification; SqlParameter SurveyingNumber = new SqlParameter("SurveyingNumber", SqlDbType.NVarChar); SurveyingNumber.Value = model.SurveyingNumber; SqlParameter SurveyingFile = new SqlParameter("SurveyingFile", SqlDbType.NVarChar); SurveyingFile.Value = model.SurveyingFile; SqlParameter LegalPerson = new SqlParameter("LegalPerson", SqlDbType.NVarChar); LegalPerson.Value = model.LegalPerson; SqlParameter LegalIDCardNumber = new SqlParameter("LegalIDCardNumber", SqlDbType.NVarChar); LegalIDCardNumber.Value = model.LegalIDCardNumber; SqlParameter LegalIDCardFile = new SqlParameter("LegalIDCardFile", SqlDbType.NVarChar); LegalIDCardFile.Value = model.LegalIDCardFile; SqlParameter PowerOfAttorney = new SqlParameter("PowerOfAttorney", SqlDbType.NVarChar); PowerOfAttorney.Value = model.PowerOfAttorney; SqlParameter Contact = new SqlParameter("Contact", SqlDbType.NVarChar); Contact.Value = model.Contact; SqlParameter ContactIDCardNumer = new SqlParameter("ContactIDCardNumer", SqlDbType.NVarChar); ContactIDCardNumer.Value = model.ContactIDCardNumer; SqlParameter ContactIDCardFile = new SqlParameter("ContactIDCardFile", SqlDbType.NVarChar); ContactIDCardFile.Value = model.ContactIDCardFile; SqlParameter CertificationTime = new SqlParameter("CertificationTime", SqlDbType.DateTime); CertificationTime.Value = model.CertificationTime; SqlParameter BelongArea = new SqlParameter("BelongArea", SqlDbType.NVarChar); BelongArea.Value = model.BelongArea; return(DBHelperSQL.GetNums(strSql, new SqlParameter[] { Company, Address, CompanyTel, Industry, OrganizationCode, BusinessLicense, SurveyingQualification, SurveyingNumber, SurveyingFile, LegalPerson, LegalIDCardNumber, LegalIDCardFile, PowerOfAttorney, Contact, ContactIDCardNumer, ContactIDCardFile, CertificationTime, BelongArea }, connectionString) == 1 ? true : false); }
/// <summary> /// 删除一条数据(根据UserName) /// </summary> /// <param name="UserName"></param> /// <returns></returns> public static bool Delete(string UserName) { string strSql = "delete from RegisterUser where UserName ='******'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
/// <summary> /// 删除一条数据(根据UserName) /// </summary> /// <param name="UserName"></param> /// <returns></returns> public static bool Delete(string OrderNumber) { string strSql = "delete from OrderList where OrderNumber ='" + OrderNumber + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
/// <summary> /// 删除一条数据(根据UserName) /// </summary> /// <param name="UserName"></param> /// <returns></returns> public static bool Delete(string Company) { string strSql = "delete from CompanyInfo where Company ='" + Company + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
public static bool Delete(int ID) { string strSql = "delete from RoamingAreaManagement where ID ='" + ID + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
/// <summary> /// 删除一条数据(根据ServerName) /// </summary> /// <param name="UserName"></param> /// <returns></returns> public static bool Delete(string GroupName) { string strSql = "delete from RoamingAreaManagement where GroupName ='" + GroupName + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
/// <summary> /// 删除一条数据(根据UserName) /// </summary> /// <param name="UserName"></param> /// <returns></returns> public static bool Delete(string Contact) { string strSql = "delete from PersonInfo where Contact ='" + Contact + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
public static bool Update(Model.ResourcesDownload model) { string strSql = "update ResourcesDownload set ResourceName=@ResourceName where ID = " + model.ID.ToString(); SqlParameter ResourceName = new SqlParameter("ResourceName", SqlDbType.NVarChar); ResourceName.Value = model.ResourceName; return DBHelperSQL.GetNums(strSql, new SqlParameter[] { ResourceName }, connectionString) == 1 ? true : false; }
/// <summary> /// 删除二条数据(根据MDZBXM) /// </summary> /// <param name="UserName"></param> /// <returns></returns> public static bool Delete(string MDZBXM) { string strSql = "delete from CoorSysPars where MDZBXM ='" + MDZBXM + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 2 ? true : false); }
/// <summary> /// 根据ID删除记录 /// </summary> /// <param name="ID"></param> /// <returns></returns> public static bool Delete(int ID) { string strSql = "delete from EquipReviceRecord where ID ='" + ID + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
public static bool Delete(int ID) { string strSql = "delete from RegisterUser where ID ='" + ID + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
/// <summary> /// 删除一条数据(根据SerialNumber) /// </summary> /// <param name="UserName"></param> /// <returns></returns> public static bool Delete(string SerialNumber) { string strSql = "delete from DataCenter where SerialNumber ='" + SerialNumber + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
/// <summary> /// 删除一条数据(根据StationOName) /// </summary> /// <param name="UserName"></param> /// <returns></returns> public static bool Delete(string StationOName) { string strSql = "delete from SiteMonitoring where StationOName ='" + StationOName + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
/// <summary> /// 删除一条数据(根据UserName) /// </summary> /// <param name="ID"></param> /// <returns></returns> public static bool Delete(int ID) { string strSql = "delete from ResourcesDownload where ID ='" + ID + "'"; return DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false; }
public static bool Delete(int ID) { string strSql = "delete from SysLog where ID = " + ID; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }
public static bool Delete(string ID) { string strSql = "delete from ContractApplication where ID ='" + ID + "'"; return(DBHelperSQL.GetNums(strSql, connectionString) == 1 ? true : false); }