/// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_OperatedLevel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_OperatedLevel set ");
            strSql.Append("ID=@ID,");
            strSql.Append("Name=@Name");
            strSql.Append(" where ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID",   SqlDbType.Int,      4),
                new SqlParameter("@Name", SqlDbType.NVarChar, 50)
            };
            parameters[0].Value = model.ID;
            parameters[1].Value = model.Name;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.T_OperatedLevel model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_OperatedLevel(");
            strSql.Append("ID,Name)");
            strSql.Append(" values (");
            strSql.Append("@ID,@Name)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID",   SqlDbType.Int,      4),
                new SqlParameter("@Name", SqlDbType.NVarChar, 50)
            };
            parameters[0].Value = model.ID;
            parameters[1].Value = model.Name;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.T_StationGeneSet model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_StationGeneSet(");
            strSql.Append("PointCode,GeneCode,DevCode,isStop,DayNum,StandardValue,DayMaxValue,DayMinValue,ChangeType,ChangeRate,Multiple,ExcelServerRCID,ExcelServerRN,ExcelServerCN,ExcelServerRC1,ExcelServerWIID,ExcelServerRTID,ExcelServerCHG)");
            strSql.Append(" values (");
            strSql.Append("@PointCode,@GeneCode,@DevCode,@isStop,@DayNum,@StandardValue,@DayMaxValue,@DayMinValue,@ChangeType,@ChangeRate,@Multiple,@ExcelServerRCID,@ExcelServerRN,@ExcelServerCN,@ExcelServerRC1,@ExcelServerWIID,@ExcelServerRTID,@ExcelServerCHG)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@PointCode",       SqlDbType.NVarChar, 50),
                new SqlParameter("@GeneCode",        SqlDbType.NVarChar, 50),
                new SqlParameter("@DevCode",         SqlDbType.NVarChar, 50),
                new SqlParameter("@isStop",          SqlDbType.Bit,       1),
                new SqlParameter("@DayNum",          SqlDbType.Int,       4),
                new SqlParameter("@StandardValue",   SqlDbType.Float,     8),
                new SqlParameter("@DayMaxValue",     SqlDbType.Float,     8),
                new SqlParameter("@DayMinValue",     SqlDbType.Float,     8),
                new SqlParameter("@ChangeType",      SqlDbType.NVarChar, 50),
                new SqlParameter("@ChangeRate",      SqlDbType.Float,     8),
                new SqlParameter("@Multiple",        SqlDbType.Decimal,   9),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.PointCode;
            parameters[1].Value  = model.GeneCode;
            parameters[2].Value  = model.DevCode;
            parameters[3].Value  = model.isStop;
            parameters[4].Value  = model.DayNum;
            parameters[5].Value  = model.StandardValue;
            parameters[6].Value  = model.DayMaxValue;
            parameters[7].Value  = model.DayMinValue;
            parameters[8].Value  = model.ChangeType;
            parameters[9].Value  = model.ChangeRate;
            parameters[10].Value = model.Multiple;
            parameters[11].Value = model.ExcelServerRCID;
            parameters[12].Value = model.ExcelServerRN;
            parameters[13].Value = model.ExcelServerCN;
            parameters[14].Value = model.ExcelServerRC1;
            parameters[15].Value = model.ExcelServerWIID;
            parameters[16].Value = model.ExcelServerRTID;
            parameters[17].Value = model.ExcelServerCHG;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.T_EquipmentParts model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_EquipmentParts(");
            strSql.Append("Partsid,PartsName,PartsModel,PartsType,PartsUnit,PartStockData,PartsSurplusData,PartsCode,ExcelServerRCID,ExcelServerRN,ExcelServerCN,ExcelServerRC1,ExcelServerWIID,ExcelServerRTID,ExcelServerCHG,Price,Remark)");
            strSql.Append(" values (");
            strSql.Append("@Partsid,@PartsName,@PartsModel,@PartsType,@PartsUnit,@PartStockData,@PartsSurplusData,@PartsCode,@ExcelServerRCID,@ExcelServerRN,@ExcelServerCN,@ExcelServerRC1,@ExcelServerWIID,@ExcelServerRTID,@ExcelServerCHG,@Price,@Remark)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Partsid",          SqlDbType.Int,       4),
                new SqlParameter("@PartsName",        SqlDbType.NVarChar, 50),
                new SqlParameter("@PartsModel",       SqlDbType.NVarChar, 50),
                new SqlParameter("@PartsType",        SqlDbType.NVarChar, 50),
                new SqlParameter("@PartsUnit",        SqlDbType.NVarChar, 50),
                new SqlParameter("@PartStockData",    SqlDbType.Int,       4),
                new SqlParameter("@PartsSurplusData", SqlDbType.Int,       4),
                new SqlParameter("@PartsCode",        SqlDbType.NVarChar, 50),
                new SqlParameter("@ExcelServerRCID",  SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRN",    SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerCN",    SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerRC1",   SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerWIID",  SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRTID",  SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerCHG",   SqlDbType.Int,       4),
                new SqlParameter("@Price",            SqlDbType.Float,     8),
                new SqlParameter("@Remark",           SqlDbType.NVarChar, 255)
            };
            parameters[0].Value  = model.Partsid;
            parameters[1].Value  = model.PartsName;
            parameters[2].Value  = model.PartsModel;
            parameters[3].Value  = model.PartsType;
            parameters[4].Value  = model.PartsUnit;
            parameters[5].Value  = model.PartStockData;
            parameters[6].Value  = model.PartsSurplusData;
            parameters[7].Value  = model.PartsCode;
            parameters[8].Value  = model.ExcelServerRCID;
            parameters[9].Value  = model.ExcelServerRN;
            parameters[10].Value = model.ExcelServerCN;
            parameters[11].Value = model.ExcelServerRC1;
            parameters[12].Value = model.ExcelServerWIID;
            parameters[13].Value = model.ExcelServerRTID;
            parameters[14].Value = model.ExcelServerCHG;
            parameters[15].Value = model.Price;
            parameters[16].Value = model.Remark;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_Supplier model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_Supplier set ");
            strSql.Append("SupplierName=@SupplierName,");
            strSql.Append("Address=@Address,");
            strSql.Append("Phone=@Phone,");
            strSql.Append("Remark=@Remark,");
            strSql.Append("ExcelServerRCID=@ExcelServerRCID,");
            strSql.Append("ExcelServerRN=@ExcelServerRN,");
            strSql.Append("ExcelServerCN=@ExcelServerCN,");
            strSql.Append("ExcelServerRC1=@ExcelServerRC1,");
            strSql.Append("ExcelServerWIID=@ExcelServerWIID,");
            strSql.Append("ExcelServerRTID=@ExcelServerRTID,");
            strSql.Append("ExcelServerCHG=@ExcelServerCHG");
            strSql.Append(" where SupplierId=@SupplierId ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@SupplierName",    SqlDbType.NVarChar, 255),
                new SqlParameter("@Address",         SqlDbType.NVarChar, 255),
                new SqlParameter("@Phone",           SqlDbType.NVarChar,  20),
                new SqlParameter("@Remark",          SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int,        4),
                new SqlParameter("@SupplierId",      SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.SupplierName;
            parameters[1].Value  = model.Address;
            parameters[2].Value  = model.Phone;
            parameters[3].Value  = model.Remark;
            parameters[4].Value  = model.ExcelServerRCID;
            parameters[5].Value  = model.ExcelServerRN;
            parameters[6].Value  = model.ExcelServerCN;
            parameters[7].Value  = model.ExcelServerRC1;
            parameters[8].Value  = model.ExcelServerWIID;
            parameters[9].Value  = model.ExcelServerRTID;
            parameters[10].Value = model.ExcelServerCHG;
            parameters[11].Value = model.SupplierId;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #6
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.T_Instrument model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_Instrument(");
            strSql.Append("InstrumentID,InstrumentName,InstrumentModel,InstrumentType,SupplierId,ExcelServerRCID,ExcelServerRN,ExcelServerCN,ExcelServerRC1,ExcelServerWIID,ExcelServerRTID,ExcelServerCHG,KingdeeId,InnerId,Remark)");
            strSql.Append(" values (");
            strSql.Append("@InstrumentID,@InstrumentName,@InstrumentModel,@InstrumentType,@SupplierId,@ExcelServerRCID,@ExcelServerRN,@ExcelServerCN,@ExcelServerRC1,@ExcelServerWIID,@ExcelServerRTID,@ExcelServerCHG,@KingdeeId,@InnerId,@Remark)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@InstrumentID",    SqlDbType.Int,        4),
                new SqlParameter("@InstrumentName",  SqlDbType.NVarChar, 255),
                new SqlParameter("@InstrumentModel", SqlDbType.NVarChar, 100),
                new SqlParameter("@InstrumentType",  SqlDbType.NVarChar,  50),
                new SqlParameter("@SupplierId",      SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int,        4),
                new SqlParameter("@KingdeeId",       SqlDbType.NVarChar,  20),
                new SqlParameter("@InnerId",         SqlDbType.NVarChar,  20),
                new SqlParameter("@Remark",          SqlDbType.NVarChar, 255)
            };
            parameters[0].Value  = model.InstrumentID;
            parameters[1].Value  = model.InstrumentName;
            parameters[2].Value  = model.InstrumentModel;
            parameters[3].Value  = model.InstrumentType;
            parameters[4].Value  = model.SupplierId;
            parameters[5].Value  = model.ExcelServerRCID;
            parameters[6].Value  = model.ExcelServerRN;
            parameters[7].Value  = model.ExcelServerCN;
            parameters[8].Value  = model.ExcelServerRC1;
            parameters[9].Value  = model.ExcelServerWIID;
            parameters[10].Value = model.ExcelServerRTID;
            parameters[11].Value = model.ExcelServerCHG;
            parameters[12].Value = model.KingdeeId;
            parameters[13].Value = model.InnerId;
            parameters[14].Value = model.Remark;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_GeneType model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_GeneType set ");
            strSql.Append("ID=@ID,");
            strSql.Append("TypeName=@TypeName,");
            strSql.Append("ExcelServerRCID=@ExcelServerRCID,");
            strSql.Append("ExcelServerRN=@ExcelServerRN,");
            strSql.Append("ExcelServerCN=@ExcelServerCN,");
            strSql.Append("ExcelServerRC1=@ExcelServerRC1,");
            strSql.Append("ExcelServerWIID=@ExcelServerWIID,");
            strSql.Append("ExcelServerRTID=@ExcelServerRTID,");
            strSql.Append("ExcelServerCHG=@ExcelServerCHG");
            strSql.Append(" where ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID",              SqlDbType.Int,       4),
                new SqlParameter("@TypeName",        SqlDbType.NVarChar, 50),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int, 4)
            };
            parameters[0].Value = model.ID;
            parameters[1].Value = model.TypeName;
            parameters[2].Value = model.ExcelServerRCID;
            parameters[3].Value = model.ExcelServerRN;
            parameters[4].Value = model.ExcelServerCN;
            parameters[5].Value = model.ExcelServerRC1;
            parameters[6].Value = model.ExcelServerWIID;
            parameters[7].Value = model.ExcelServerRTID;
            parameters[8].Value = model.ExcelServerCHG;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.T_Supplier model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_Supplier(");
            strSql.Append("SupplierId,SupplierName,Address,Phone,Remark,ExcelServerRCID,ExcelServerRN,ExcelServerCN,ExcelServerRC1,ExcelServerWIID,ExcelServerRTID,ExcelServerCHG)");
            strSql.Append(" values (");
            strSql.Append("@SupplierId,@SupplierName,@Address,@Phone,@Remark,@ExcelServerRCID,@ExcelServerRN,@ExcelServerCN,@ExcelServerRC1,@ExcelServerWIID,@ExcelServerRTID,@ExcelServerCHG)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@SupplierId",      SqlDbType.Int,        4),
                new SqlParameter("@SupplierName",    SqlDbType.NVarChar, 255),
                new SqlParameter("@Address",         SqlDbType.NVarChar, 255),
                new SqlParameter("@Phone",           SqlDbType.NVarChar,  20),
                new SqlParameter("@Remark",          SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.SupplierId;
            parameters[1].Value  = model.SupplierName;
            parameters[2].Value  = model.Address;
            parameters[3].Value  = model.Phone;
            parameters[4].Value  = model.Remark;
            parameters[5].Value  = model.ExcelServerRCID;
            parameters[6].Value  = model.ExcelServerRN;
            parameters[7].Value  = model.ExcelServerCN;
            parameters[8].Value  = model.ExcelServerRC1;
            parameters[9].Value  = model.ExcelServerWIID;
            parameters[10].Value = model.ExcelServerRTID;
            parameters[11].Value = model.ExcelServerCHG;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string PointIDlist)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_StationInformation ");
            strSql.Append(" where PointID in (" + PointIDlist + ")  ");
            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string Partsidlist)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_EquipmentParts ");
            strSql.Append(" where Partsid in (" + Partsidlist + ")  ");
            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string IDlist)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_Contractor ");
            strSql.Append(" where ID in (" + IDlist + ")  ");
            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.T_GeneType model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_GeneType(");
            strSql.Append("ID,TypeName,ExcelServerRCID,ExcelServerRN,ExcelServerCN,ExcelServerRC1,ExcelServerWIID,ExcelServerRTID,ExcelServerCHG)");
            strSql.Append(" values (");
            strSql.Append("@ID,@TypeName,@ExcelServerRCID,@ExcelServerRN,@ExcelServerCN,@ExcelServerRC1,@ExcelServerWIID,@ExcelServerRTID,@ExcelServerCHG)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID",              SqlDbType.Int,       4),
                new SqlParameter("@TypeName",        SqlDbType.NVarChar, 50),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int, 4)
            };
            parameters[0].Value = model.ID;
            parameters[1].Value = model.TypeName;
            parameters[2].Value = model.ExcelServerRCID;
            parameters[3].Value = model.ExcelServerRN;
            parameters[4].Value = model.ExcelServerCN;
            parameters[5].Value = model.ExcelServerRC1;
            parameters[6].Value = model.ExcelServerWIID;
            parameters[7].Value = model.ExcelServerRTID;
            parameters[8].Value = model.ExcelServerCHG;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #13
0
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete()
        {
            //该表无主键信息,请自定义主键/条件字段
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from V_Station2 ");
            strSql.Append(" where ");
            SqlParameter[] parameters =
            {
            };

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int Partsid)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_EquipmentParts ");
            strSql.Append(" where Partsid=@Partsid ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Partsid", SqlDbType.Int, 4)
            };
            parameters[0].Value = Partsid;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int ID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_Contractor ");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = ID;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string PointCode)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_StationInformation ");
            strSql.Append(" where PointCode=@PointCode ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@PointCode", SqlDbType.NVarChar, 20)
            };
            parameters[0].Value = PointCode;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int SupplierId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_Supplier ");
            strSql.Append(" where SupplierId=@SupplierId ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@SupplierId", SqlDbType.Int, 4)
            };
            parameters[0].Value = SupplierId;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string CompanyCode)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_Company ");
            strSql.Append(" where CompanyCode=@CompanyCode ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@CompanyCode", SqlDbType.NVarChar, 255)
            };
            parameters[0].Value = CompanyCode;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.V_StationDevGene model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update V_StationDevGene set ");
            strSql.Append("AreaName=@AreaName,");
            strSql.Append("PointID=@PointID,");
            strSql.Append("PointName=@PointName,");
            strSql.Append("MnCode=@MnCode,");
            strSql.Append("geneID=@geneID,");
            strSql.Append("genename=@genename,");
            strSql.Append("unit=@unit,");
            strSql.Append("geneT212=@geneT212,");
            strSql.Append("InstrumentID=@InstrumentID,");
            strSql.Append("InstrumentName=@InstrumentName,");
            strSql.Append("InstrumentModel=@InstrumentModel,");
            strSql.Append("InstallDate=@InstallDate,");
            strSql.Append("DevCode=@DevCode,");
            strSql.Append("isStop=@isStop,");
            strSql.Append("DayNum=@DayNum,");
            strSql.Append("RangeDown=@RangeDown,");
            strSql.Append("RangeUp=@RangeUp,");
            strSql.Append("StandardMinValue=@StandardMinValue,");
            strSql.Append("StandardMaxValue=@StandardMaxValue,");
            strSql.Append("DayMinValue=@DayMinValue,");
            strSql.Append("DayMaxValue=@DayMaxValue,");
            strSql.Append("ChangeType=@ChangeType,");
            strSql.Append("ChangeRate=@ChangeRate,");
            strSql.Append("DetectionPrinciple=@DetectionPrinciple,");
            strSql.Append("HasZs=@HasZs,");
            strSql.Append("HasPf=@HasPf,");
            strSql.Append("IsJudgeStandard=@IsJudgeStandard,");
            strSql.Append("DecimalPlaces=@DecimalPlaces,");
            strSql.Append("Sort=@Sort,");
            strSql.Append("PointUses=@PointUses,");
            strSql.Append("PointCode=@PointCode");
            strSql.Append(" where ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@AreaName",           SqlDbType.NVarChar,  255),
                new SqlParameter("@PointID",            SqlDbType.Int,         4),
                new SqlParameter("@PointName",          SqlDbType.NVarChar,  255),
                new SqlParameter("@MnCode",             SqlDbType.NVarChar,   20),
                new SqlParameter("@geneID",             SqlDbType.Int,         4),
                new SqlParameter("@genename",           SqlDbType.NVarChar,  255),
                new SqlParameter("@unit",               SqlDbType.VarChar,    50),
                new SqlParameter("@geneT212",           SqlDbType.NVarChar,   50),
                new SqlParameter("@InstrumentID",       SqlDbType.NVarChar,   50),
                new SqlParameter("@InstrumentName",     SqlDbType.NVarChar,  255),
                new SqlParameter("@InstrumentModel",    SqlDbType.NVarChar,   50),
                new SqlParameter("@InstallDate",        SqlDbType.DateTime),
                new SqlParameter("@DevCode",            SqlDbType.NVarChar,   50),
                new SqlParameter("@isStop",             SqlDbType.Bit,         1),
                new SqlParameter("@DayNum",             SqlDbType.Int,         4),
                new SqlParameter("@RangeDown",          SqlDbType.Decimal,     9),
                new SqlParameter("@RangeUp",            SqlDbType.Decimal,     9),
                new SqlParameter("@StandardMinValue",   SqlDbType.Decimal,     9),
                new SqlParameter("@StandardMaxValue",   SqlDbType.Decimal,     9),
                new SqlParameter("@DayMinValue",        SqlDbType.Decimal,     9),
                new SqlParameter("@DayMaxValue",        SqlDbType.Decimal,     9),
                new SqlParameter("@ChangeType",         SqlDbType.NVarChar,   50),
                new SqlParameter("@ChangeRate",         SqlDbType.Float,       8),
                new SqlParameter("@DetectionPrinciple", SqlDbType.NVarChar,  255),
                new SqlParameter("@HasZs",              SqlDbType.Bit,         1),
                new SqlParameter("@HasPf",              SqlDbType.Bit,         1),
                new SqlParameter("@IsJudgeStandard",    SqlDbType.Bit,         1),
                new SqlParameter("@DecimalPlaces",      SqlDbType.Int,         4),
                new SqlParameter("@Sort",               SqlDbType.Int,         4),
                new SqlParameter("@PointUses",          SqlDbType.Bit,         1),
                new SqlParameter("@PointCode",          SqlDbType.NVarChar, 20)
            };
            parameters[0].Value  = model.AreaName;
            parameters[1].Value  = model.PointID;
            parameters[2].Value  = model.PointName;
            parameters[3].Value  = model.MnCode;
            parameters[4].Value  = model.geneID;
            parameters[5].Value  = model.genename;
            parameters[6].Value  = model.unit;
            parameters[7].Value  = model.geneT212;
            parameters[8].Value  = model.InstrumentID;
            parameters[9].Value  = model.InstrumentName;
            parameters[10].Value = model.InstrumentModel;
            parameters[11].Value = model.InstallDate;
            parameters[12].Value = model.DevCode;
            parameters[13].Value = model.isStop;
            parameters[14].Value = model.DayNum;
            parameters[15].Value = model.RangeDown;
            parameters[16].Value = model.RangeUp;
            parameters[17].Value = model.StandardMinValue;
            parameters[18].Value = model.StandardMaxValue;
            parameters[19].Value = model.DayMinValue;
            parameters[20].Value = model.DayMaxValue;
            parameters[21].Value = model.ChangeType;
            parameters[22].Value = model.ChangeRate;
            parameters[23].Value = model.DetectionPrinciple;
            parameters[24].Value = model.HasZs;
            parameters[25].Value = model.HasPf;
            parameters[26].Value = model.IsJudgeStandard;
            parameters[27].Value = model.DecimalPlaces;
            parameters[28].Value = model.Sort;
            parameters[29].Value = model.PointUses;
            parameters[30].Value = model.PointCode;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.V_StationDevGene model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into V_StationDevGene(");
            strSql.Append("AreaName,PointID,PointName,MnCode,geneID,genename,unit,geneT212,InstrumentID,InstrumentName,InstrumentModel,InstallDate,DevCode,isStop,DayNum,RangeDown,RangeUp,StandardMinValue,StandardMaxValue,DayMinValue,DayMaxValue,ChangeType,ChangeRate,DetectionPrinciple,HasZs,HasPf,IsJudgeStandard,DecimalPlaces,Sort,PointUses,PointCode)");
            strSql.Append(" values (");
            strSql.Append("@AreaName,@PointID,@PointName,@MnCode,@geneID,@genename,@unit,@geneT212,@InstrumentID,@InstrumentName,@InstrumentModel,@InstallDate,@DevCode,@isStop,@DayNum,@RangeDown,@RangeUp,@StandardMinValue,@StandardMaxValue,@DayMinValue,@DayMaxValue,@ChangeType,@ChangeRate,@DetectionPrinciple,@HasZs,@HasPf,@IsJudgeStandard,@DecimalPlaces,@Sort,@PointUses,@PointCode)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@AreaName",           SqlDbType.NVarChar,  255),
                new SqlParameter("@PointID",            SqlDbType.Int,         4),
                new SqlParameter("@PointName",          SqlDbType.NVarChar,  255),
                new SqlParameter("@MnCode",             SqlDbType.NVarChar,   20),
                new SqlParameter("@geneID",             SqlDbType.Int,         4),
                new SqlParameter("@genename",           SqlDbType.NVarChar,  255),
                new SqlParameter("@unit",               SqlDbType.VarChar,    50),
                new SqlParameter("@geneT212",           SqlDbType.NVarChar,   50),
                new SqlParameter("@InstrumentID",       SqlDbType.NVarChar,   50),
                new SqlParameter("@InstrumentName",     SqlDbType.NVarChar,  255),
                new SqlParameter("@InstrumentModel",    SqlDbType.NVarChar,   50),
                new SqlParameter("@InstallDate",        SqlDbType.DateTime),
                new SqlParameter("@DevCode",            SqlDbType.NVarChar,   50),
                new SqlParameter("@isStop",             SqlDbType.Bit,         1),
                new SqlParameter("@DayNum",             SqlDbType.Int,         4),
                new SqlParameter("@RangeDown",          SqlDbType.Decimal,     9),
                new SqlParameter("@RangeUp",            SqlDbType.Decimal,     9),
                new SqlParameter("@StandardMinValue",   SqlDbType.Decimal,     9),
                new SqlParameter("@StandardMaxValue",   SqlDbType.Decimal,     9),
                new SqlParameter("@DayMinValue",        SqlDbType.Decimal,     9),
                new SqlParameter("@DayMaxValue",        SqlDbType.Decimal,     9),
                new SqlParameter("@ChangeType",         SqlDbType.NVarChar,   50),
                new SqlParameter("@ChangeRate",         SqlDbType.Float,       8),
                new SqlParameter("@DetectionPrinciple", SqlDbType.NVarChar,  255),
                new SqlParameter("@HasZs",              SqlDbType.Bit,         1),
                new SqlParameter("@HasPf",              SqlDbType.Bit,         1),
                new SqlParameter("@IsJudgeStandard",    SqlDbType.Bit,         1),
                new SqlParameter("@DecimalPlaces",      SqlDbType.Int,         4),
                new SqlParameter("@Sort",               SqlDbType.Int,         4),
                new SqlParameter("@PointUses",          SqlDbType.Bit,         1),
                new SqlParameter("@PointCode",          SqlDbType.NVarChar, 20)
            };
            parameters[0].Value  = model.AreaName;
            parameters[1].Value  = model.PointID;
            parameters[2].Value  = model.PointName;
            parameters[3].Value  = model.MnCode;
            parameters[4].Value  = model.geneID;
            parameters[5].Value  = model.genename;
            parameters[6].Value  = model.unit;
            parameters[7].Value  = model.geneT212;
            parameters[8].Value  = model.InstrumentID;
            parameters[9].Value  = model.InstrumentName;
            parameters[10].Value = model.InstrumentModel;
            parameters[11].Value = model.InstallDate;
            parameters[12].Value = model.DevCode;
            parameters[13].Value = model.isStop;
            parameters[14].Value = model.DayNum;
            parameters[15].Value = model.RangeDown;
            parameters[16].Value = model.RangeUp;
            parameters[17].Value = model.StandardMinValue;
            parameters[18].Value = model.StandardMaxValue;
            parameters[19].Value = model.DayMinValue;
            parameters[20].Value = model.DayMaxValue;
            parameters[21].Value = model.ChangeType;
            parameters[22].Value = model.ChangeRate;
            parameters[23].Value = model.DetectionPrinciple;
            parameters[24].Value = model.HasZs;
            parameters[25].Value = model.HasPf;
            parameters[26].Value = model.IsJudgeStandard;
            parameters[27].Value = model.DecimalPlaces;
            parameters[28].Value = model.Sort;
            parameters[29].Value = model.PointUses;
            parameters[30].Value = model.PointCode;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_StationInformation model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_StationInformation set ");
            strSql.Append("CompanyCode=@CompanyCode,");
            strSql.Append("PointName=@PointName,");
            strSql.Append("PointUses=@PointUses,");
            strSql.Append("PointType=@PointType,");
            strSql.Append("OperatedLevel=@OperatedLevel,");
            strSql.Append("OperatedCenter=@OperatedCenter,");
            strSql.Append("OperatedGroup=@OperatedGroup,");
            strSql.Append("Director=@Director,");
            strSql.Append("RouterIP=@RouterIP,");
            strSql.Append("DataIP=@DataIP,");
            strSql.Append("VedioIP=@VedioIP,");
            strSql.Append("LineNo=@LineNo,");
            strSql.Append("Vlan=@Vlan,");
            strSql.Append("NetOperator=@NetOperator,");
            strSql.Append("NetType=@NetType,");
            strSql.Append("remark=@remark,");
            strSql.Append("UpdateTime=@UpdateTime,");
            strSql.Append("UpdatePerson=@UpdatePerson,");
            strSql.Append("ExcelServerRCID=@ExcelServerRCID,");
            strSql.Append("ExcelServerRN=@ExcelServerRN,");
            strSql.Append("ExcelServerCN=@ExcelServerCN,");
            strSql.Append("ExcelServerRC1=@ExcelServerRC1,");
            strSql.Append("ExcelServerWIID=@ExcelServerWIID,");
            strSql.Append("ExcelServerRTID=@ExcelServerRTID,");
            strSql.Append("ExcelServerCHG=@ExcelServerCHG,");
            strSql.Append("MnCode=@MnCode,");
            strSql.Append("OutletNo=@OutletNo,");
            strSql.Append("PassTime=@PassTime,");
            strSql.Append("PointCode1=@PointCode1,");
            strSql.Append("EnvirLevel=@EnvirLevel,");
            strSql.Append("IsPatrol=@IsPatrol,");
            strSql.Append("IsContract=@IsContract,");
            strSql.Append("CompanyID=@CompanyID,");
            strSql.Append("Longitude=@Longitude,");
            strSql.Append("latitude=@latitude,");
            strSql.Append("frequency=@frequency,");
            strSql.Append("Pointaddress=@Pointaddress,");
            strSql.Append("PointCodeB=@PointCodeB,");
            strSql.Append("Controlsystem=@Controlsystem,");
            strSql.Append("Treatmentprocess=@Treatmentprocess");
            strSql.Append(" where PointID=@PointID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@CompanyCode",      SqlDbType.NVarChar,   20),
                new SqlParameter("@PointName",        SqlDbType.NVarChar,  255),
                new SqlParameter("@PointUses",        SqlDbType.Bit,         1),
                new SqlParameter("@PointType",        SqlDbType.Int,         4),
                new SqlParameter("@OperatedLevel",    SqlDbType.NVarChar,   20),
                new SqlParameter("@OperatedCenter",   SqlDbType.NVarChar,   20),
                new SqlParameter("@OperatedGroup",    SqlDbType.NVarChar,   20),
                new SqlParameter("@Director",         SqlDbType.NVarChar,   50),
                new SqlParameter("@RouterIP",         SqlDbType.NVarChar,  255),
                new SqlParameter("@DataIP",           SqlDbType.NVarChar,  255),
                new SqlParameter("@VedioIP",          SqlDbType.NVarChar,  255),
                new SqlParameter("@LineNo",           SqlDbType.NVarChar,   50),
                new SqlParameter("@Vlan",             SqlDbType.NVarChar,   20),
                new SqlParameter("@NetOperator",      SqlDbType.NVarChar,   20),
                new SqlParameter("@NetType",          SqlDbType.NVarChar,   20),
                new SqlParameter("@remark",           SqlDbType.NVarChar,  255),
                new SqlParameter("@UpdateTime",       SqlDbType.DateTime),
                new SqlParameter("@UpdatePerson",     SqlDbType.NVarChar,   50),
                new SqlParameter("@ExcelServerRCID",  SqlDbType.NVarChar,   20),
                new SqlParameter("@ExcelServerRN",    SqlDbType.Int,         4),
                new SqlParameter("@ExcelServerCN",    SqlDbType.Int,         4),
                new SqlParameter("@ExcelServerRC1",   SqlDbType.NVarChar,   20),
                new SqlParameter("@ExcelServerWIID",  SqlDbType.NVarChar,   20),
                new SqlParameter("@ExcelServerRTID",  SqlDbType.NVarChar,   20),
                new SqlParameter("@ExcelServerCHG",   SqlDbType.Int,         4),
                new SqlParameter("@MnCode",           SqlDbType.NVarChar,   20),
                new SqlParameter("@OutletNo",         SqlDbType.NVarChar,   20),
                new SqlParameter("@PassTime",         SqlDbType.DateTime),
                new SqlParameter("@PointCode1",       SqlDbType.NVarChar,   20),
                new SqlParameter("@EnvirLevel",       SqlDbType.NVarChar,   50),
                new SqlParameter("@IsPatrol",         SqlDbType.Bit,         1),
                new SqlParameter("@IsContract",       SqlDbType.Bit,         1),
                new SqlParameter("@CompanyID",        SqlDbType.Int,         4),
                new SqlParameter("@Longitude",        SqlDbType.NVarChar,   50),
                new SqlParameter("@latitude",         SqlDbType.NVarChar,   50),
                new SqlParameter("@frequency",        SqlDbType.Int,         4),
                new SqlParameter("@Pointaddress",     SqlDbType.NVarChar,  255),
                new SqlParameter("@PointCodeB",       SqlDbType.NVarChar,   50),
                new SqlParameter("@Controlsystem",    SqlDbType.NVarChar,   50),
                new SqlParameter("@Treatmentprocess", SqlDbType.NVarChar,   50),
                new SqlParameter("@PointCode",        SqlDbType.NVarChar,   20),
                new SqlParameter("@PointID",          SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.CompanyCode;
            parameters[1].Value  = model.PointName;
            parameters[2].Value  = model.PointUses;
            parameters[3].Value  = model.PointType;
            parameters[4].Value  = model.OperatedLevel;
            parameters[5].Value  = model.OperatedCenter;
            parameters[6].Value  = model.OperatedGroup;
            parameters[7].Value  = model.Director;
            parameters[8].Value  = model.RouterIP;
            parameters[9].Value  = model.DataIP;
            parameters[10].Value = model.VedioIP;
            parameters[11].Value = model.LineNo;
            parameters[12].Value = model.Vlan;
            parameters[13].Value = model.NetOperator;
            parameters[14].Value = model.NetType;
            parameters[15].Value = model.remark;
            parameters[16].Value = model.UpdateTime;
            parameters[17].Value = model.UpdatePerson;
            parameters[18].Value = model.ExcelServerRCID;
            parameters[19].Value = model.ExcelServerRN;
            parameters[20].Value = model.ExcelServerCN;
            parameters[21].Value = model.ExcelServerRC1;
            parameters[22].Value = model.ExcelServerWIID;
            parameters[23].Value = model.ExcelServerRTID;
            parameters[24].Value = model.ExcelServerCHG;
            parameters[25].Value = model.MnCode;
            parameters[26].Value = model.OutletNo;
            parameters[27].Value = model.PassTime;
            parameters[28].Value = model.PointCode1;
            parameters[29].Value = model.EnvirLevel;
            parameters[30].Value = model.IsPatrol;
            parameters[31].Value = model.IsContract;
            parameters[32].Value = model.CompanyID;
            parameters[33].Value = model.Longitude;
            parameters[34].Value = model.latitude;
            parameters[35].Value = model.frequency;
            parameters[36].Value = model.Pointaddress;
            parameters[37].Value = model.PointCodeB;
            parameters[38].Value = model.Controlsystem;
            parameters[39].Value = model.Treatmentprocess;
            parameters[40].Value = model.PointCode;
            parameters[41].Value = model.PointID;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_StationNet model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_StationNet set ");
            strSql.Append("RouterIP=@RouterIP,");
            strSql.Append("RouterPort=@RouterPort,");
            strSql.Append("RounterUser=@RounterUser,");
            strSql.Append("RounterPws=@RounterPws,");
            strSql.Append("DataIP=@DataIP,");
            strSql.Append("DataPort=@DataPort,");
            strSql.Append("DataUser=@DataUser,");
            strSql.Append("DataPws=@DataPws,");
            strSql.Append("VedioIP=@VedioIP,");
            strSql.Append("VideoPort=@VideoPort,");
            strSql.Append("VidioID=@VidioID,");
            strSql.Append("VideoUser=@VideoUser,");
            strSql.Append("VideoPws=@VideoPws,");
            strSql.Append("LineNo=@LineNo,");
            strSql.Append("Vlan=@Vlan,");
            strSql.Append("NetOperator=@NetOperator,");
            strSql.Append("NetType=@NetType,");
            strSql.Append("PW=@PW,");
            strSql.Append("ExcelServerRCID=@ExcelServerRCID,");
            strSql.Append("ExcelServerRN=@ExcelServerRN,");
            strSql.Append("ExcelServerCN=@ExcelServerCN,");
            strSql.Append("ExcelServerRC1=@ExcelServerRC1,");
            strSql.Append("ExcelServerWIID=@ExcelServerWIID,");
            strSql.Append("ExcelServerRTID=@ExcelServerRTID,");
            strSql.Append("ExcelServerCHG=@ExcelServerCHG");
            strSql.Append(" where PointID=@PointID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@RouterIP",        SqlDbType.NVarChar, 50),
                new SqlParameter("@RouterPort",      SqlDbType.NVarChar, 50),
                new SqlParameter("@RounterUser",     SqlDbType.NVarChar, 50),
                new SqlParameter("@RounterPws",      SqlDbType.NVarChar, 50),
                new SqlParameter("@DataIP",          SqlDbType.NVarChar, 50),
                new SqlParameter("@DataPort",        SqlDbType.NVarChar, 50),
                new SqlParameter("@DataUser",        SqlDbType.NVarChar, 50),
                new SqlParameter("@DataPws",         SqlDbType.NVarChar, 50),
                new SqlParameter("@VedioIP",         SqlDbType.NVarChar, 50),
                new SqlParameter("@VideoPort",       SqlDbType.NVarChar, 50),
                new SqlParameter("@VidioID",         SqlDbType.NVarChar, 50),
                new SqlParameter("@VideoUser",       SqlDbType.NVarChar, 50),
                new SqlParameter("@VideoPws",        SqlDbType.NVarChar, 50),
                new SqlParameter("@LineNo",          SqlDbType.NVarChar, 50),
                new SqlParameter("@Vlan",            SqlDbType.NVarChar, 50),
                new SqlParameter("@NetOperator",     SqlDbType.NVarChar, 50),
                new SqlParameter("@NetType",         SqlDbType.NVarChar, 50),
                new SqlParameter("@PW",              SqlDbType.NVarChar, 25),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int,       4),
                new SqlParameter("@PointID",         SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.RouterIP;
            parameters[1].Value  = model.RouterPort;
            parameters[2].Value  = model.RounterUser;
            parameters[3].Value  = model.RounterPws;
            parameters[4].Value  = model.DataIP;
            parameters[5].Value  = model.DataPort;
            parameters[6].Value  = model.DataUser;
            parameters[7].Value  = model.DataPws;
            parameters[8].Value  = model.VedioIP;
            parameters[9].Value  = model.VideoPort;
            parameters[10].Value = model.VidioID;
            parameters[11].Value = model.VideoUser;
            parameters[12].Value = model.VideoPws;
            parameters[13].Value = model.LineNo;
            parameters[14].Value = model.Vlan;
            parameters[15].Value = model.NetOperator;
            parameters[16].Value = model.NetType;
            parameters[17].Value = model.PW;
            parameters[18].Value = model.ExcelServerRCID;
            parameters[19].Value = model.ExcelServerRN;
            parameters[20].Value = model.ExcelServerCN;
            parameters[21].Value = model.ExcelServerRC1;
            parameters[22].Value = model.ExcelServerWIID;
            parameters[23].Value = model.ExcelServerRTID;
            parameters[24].Value = model.ExcelServerCHG;
            parameters[25].Value = model.PointID;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_Contractor model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_Contractor set ");
            strSql.Append("ContractorID=@ContractorID,");
            strSql.Append("CompanyCode=@CompanyCode,");
            strSql.Append("Name=@Name,");
            strSql.Append("cellphone=@cellphone,");
            strSql.Append("telephone=@telephone,");
            strSql.Append("remark=@remark,");
            strSql.Append("qq=@qq,");
            strSql.Append("email=@email,");
            strSql.Append("fax=@fax,");
            strSql.Append("ExcelServerRCID=@ExcelServerRCID,");
            strSql.Append("ExcelServerRN=@ExcelServerRN,");
            strSql.Append("ExcelServerCN=@ExcelServerCN,");
            strSql.Append("ExcelServerRC1=@ExcelServerRC1,");
            strSql.Append("ExcelServerWIID=@ExcelServerWIID,");
            strSql.Append("ExcelServerRTID=@ExcelServerRTID,");
            strSql.Append("ExcelServerCHG=@ExcelServerCHG,");
            strSql.Append("RecordFlag=@RecordFlag");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ContractorID",    SqlDbType.NVarChar, 255),
                new SqlParameter("@CompanyCode",     SqlDbType.NVarChar, 255),
                new SqlParameter("@Name",            SqlDbType.NVarChar, 255),
                new SqlParameter("@cellphone",       SqlDbType.NVarChar, 255),
                new SqlParameter("@telephone",       SqlDbType.NVarChar, 255),
                new SqlParameter("@remark",          SqlDbType.NVarChar, 255),
                new SqlParameter("@qq",              SqlDbType.NVarChar, 255),
                new SqlParameter("@email",           SqlDbType.NVarChar, 255),
                new SqlParameter("@fax",             SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int,        4),
                new SqlParameter("@RecordFlag",      SqlDbType.NVarChar,  25),
                new SqlParameter("@ID",              SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.ContractorID;
            parameters[1].Value  = model.CompanyCode;
            parameters[2].Value  = model.Name;
            parameters[3].Value  = model.cellphone;
            parameters[4].Value  = model.telephone;
            parameters[5].Value  = model.remark;
            parameters[6].Value  = model.qq;
            parameters[7].Value  = model.email;
            parameters[8].Value  = model.fax;
            parameters[9].Value  = model.ExcelServerRCID;
            parameters[10].Value = model.ExcelServerRN;
            parameters[11].Value = model.ExcelServerCN;
            parameters[12].Value = model.ExcelServerRC1;
            parameters[13].Value = model.ExcelServerWIID;
            parameters[14].Value = model.ExcelServerRTID;
            parameters[15].Value = model.ExcelServerCHG;
            parameters[16].Value = model.RecordFlag;
            parameters[17].Value = model.ID;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #24
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_DevGeneSet model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_DevGeneSet set ");
            strSql.Append("PointID=@PointID,");
            strSql.Append("DevCode=@DevCode,");
            strSql.Append("GeneID=@GeneID,");
            strSql.Append("isStop=@isStop,");
            strSql.Append("DayNum=@DayNum,");
            strSql.Append("RangeUp=@RangeUp,");
            strSql.Append("RangeDown=@RangeDown,");
            strSql.Append("StandardMaxValue=@StandardMaxValue,");
            strSql.Append("StandardMinValue=@StandardMinValue,");
            strSql.Append("IsJudgeStandard=@IsJudgeStandard,");
            strSql.Append("DayMaxValue=@DayMaxValue,");
            strSql.Append("DayMinValue=@DayMinValue,");
            strSql.Append("ChangeType=@ChangeType,");
            strSql.Append("ChangeRate=@ChangeRate,");
            strSql.Append("DetectionPrinciple=@DetectionPrinciple,");
            strSql.Append("HasZs=@HasZs,");
            strSql.Append("HasPf=@HasPf,");
            strSql.Append("DecimalPlaces=@DecimalPlaces,");
            strSql.Append("Sort=@Sort,");
            strSql.Append("RecordFlag=@RecordFlag,");
            strSql.Append("ExcelServerRCID=@ExcelServerRCID,");
            strSql.Append("ExcelServerRN=@ExcelServerRN,");
            strSql.Append("ExcelServerCN=@ExcelServerCN,");
            strSql.Append("ExcelServerRC1=@ExcelServerRC1,");
            strSql.Append("ExcelServerWIID=@ExcelServerWIID,");
            strSql.Append("ExcelServerRTID=@ExcelServerRTID,");
            strSql.Append("ExcelServerCHG=@ExcelServerCHG");
            strSql.Append(" where ID=@ID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@PointID",            SqlDbType.Int,        4),
                new SqlParameter("@DevCode",            SqlDbType.NVarChar,  50),
                new SqlParameter("@GeneID",             SqlDbType.Int,        4),
                new SqlParameter("@isStop",             SqlDbType.Bit,        1),
                new SqlParameter("@DayNum",             SqlDbType.Int,        4),
                new SqlParameter("@RangeUp",            SqlDbType.Decimal,    9),
                new SqlParameter("@RangeDown",          SqlDbType.Decimal,    9),
                new SqlParameter("@StandardMaxValue",   SqlDbType.Decimal,    9),
                new SqlParameter("@StandardMinValue",   SqlDbType.Decimal,    9),
                new SqlParameter("@IsJudgeStandard",    SqlDbType.Bit,        1),
                new SqlParameter("@DayMaxValue",        SqlDbType.Decimal,    9),
                new SqlParameter("@DayMinValue",        SqlDbType.Decimal,    9),
                new SqlParameter("@ChangeType",         SqlDbType.NVarChar,  50),
                new SqlParameter("@ChangeRate",         SqlDbType.Float,      8),
                new SqlParameter("@DetectionPrinciple", SqlDbType.NVarChar, 255),
                new SqlParameter("@HasZs",              SqlDbType.Bit,        1),
                new SqlParameter("@HasPf",              SqlDbType.Bit,        1),
                new SqlParameter("@DecimalPlaces",      SqlDbType.Int,        4),
                new SqlParameter("@Sort",               SqlDbType.Int,        4),
                new SqlParameter("@RecordFlag",         SqlDbType.NVarChar,  25),
                new SqlParameter("@ExcelServerRCID",    SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerRN",      SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerCN",      SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerRC1",     SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerWIID",    SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerRTID",    SqlDbType.NVarChar, 255),
                new SqlParameter("@ExcelServerCHG",     SqlDbType.Int,        4),
                new SqlParameter("@ID",                 SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.PointID;
            parameters[1].Value  = model.DevCode;
            parameters[2].Value  = model.GeneID;
            parameters[3].Value  = model.isStop;
            parameters[4].Value  = model.DayNum;
            parameters[5].Value  = model.RangeUp;
            parameters[6].Value  = model.RangeDown;
            parameters[7].Value  = model.StandardMaxValue;
            parameters[8].Value  = model.StandardMinValue;
            parameters[9].Value  = model.IsJudgeStandard;
            parameters[10].Value = model.DayMaxValue;
            parameters[11].Value = model.DayMinValue;
            parameters[12].Value = model.ChangeType;
            parameters[13].Value = model.ChangeRate;
            parameters[14].Value = model.DetectionPrinciple;
            parameters[15].Value = model.HasZs;
            parameters[16].Value = model.HasPf;
            parameters[17].Value = model.DecimalPlaces;
            parameters[18].Value = model.Sort;
            parameters[19].Value = model.RecordFlag;
            parameters[20].Value = model.ExcelServerRCID;
            parameters[21].Value = model.ExcelServerRN;
            parameters[22].Value = model.ExcelServerCN;
            parameters[23].Value = model.ExcelServerRC1;
            parameters[24].Value = model.ExcelServerWIID;
            parameters[25].Value = model.ExcelServerRTID;
            parameters[26].Value = model.ExcelServerCHG;
            parameters[27].Value = model.ID;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_Company model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_Company set ");
            strSql.Append("AreaCode=@AreaCode,");
            strSql.Append("CompanyName=@CompanyName,");
            strSql.Append("CompanyType=@CompanyType,");
            strSql.Append("CompanyIndustry=@CompanyIndustry,");
            strSql.Append("CompanyPhone=@CompanyPhone,");
            strSql.Append("CompanyLegal=@CompanyLegal,");
            strSql.Append("CompanyLegalNo=@CompanyLegalNo,");
            strSql.Append("CompanyAddress=@CompanyAddress,");
            strSql.Append("Town=@Town,");
            strSql.Append("Street=@Street,");
            strSql.Append("CompanyIsStop=@CompanyIsStop,");
            strSql.Append("remark=@remark,");
            strSql.Append("UpdateTime=@UpdateTime,");
            strSql.Append("UpdatePerson=@UpdatePerson,");
            strSql.Append("ExcelServerRCID=@ExcelServerRCID,");
            strSql.Append("ExcelServerRN=@ExcelServerRN,");
            strSql.Append("ExcelServerCN=@ExcelServerCN,");
            strSql.Append("ExcelServerRC1=@ExcelServerRC1,");
            strSql.Append("ExcelServerWIID=@ExcelServerWIID,");
            strSql.Append("ExcelServerRTID=@ExcelServerRTID,");
            strSql.Append("ExcelServerCHG=@ExcelServerCHG,");
            strSql.Append("contrator=@contrator,");
            strSql.Append("AreaID=@AreaID,");
            strSql.Append("Longitude=@Longitude,");
            strSql.Append("latitude=@latitude");
            strSql.Append(" where CompanyID=@CompanyID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@AreaCode",        SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyName",     SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyType",     SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyIndustry", SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyPhone",    SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyLegal",    SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyLegalNo",  SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyAddress",  SqlDbType.NVarChar,  255),
                new SqlParameter("@Town",            SqlDbType.NVarChar,  255),
                new SqlParameter("@Street",          SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyIsStop",   SqlDbType.Bit,         1),
                new SqlParameter("@remark",          SqlDbType.NVarChar,  255),
                new SqlParameter("@UpdateTime",      SqlDbType.DateTime),
                new SqlParameter("@UpdatePerson",    SqlDbType.NVarChar,  255),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar,  255),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,         4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,         4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar,  255),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar,  255),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar,  255),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int,         4),
                new SqlParameter("@contrator",       SqlDbType.NVarChar,  100),
                new SqlParameter("@AreaID",          SqlDbType.Int,         4),
                new SqlParameter("@Longitude",       SqlDbType.Decimal,     9),
                new SqlParameter("@latitude",        SqlDbType.Decimal,     9),
                new SqlParameter("@CompanyCode",     SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyID",       SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.AreaCode;
            parameters[1].Value  = model.CompanyName;
            parameters[2].Value  = model.CompanyType;
            parameters[3].Value  = model.CompanyIndustry;
            parameters[4].Value  = model.CompanyPhone;
            parameters[5].Value  = model.CompanyLegal;
            parameters[6].Value  = model.CompanyLegalNo;
            parameters[7].Value  = model.CompanyAddress;
            parameters[8].Value  = model.Town;
            parameters[9].Value  = model.Street;
            parameters[10].Value = model.CompanyIsStop;
            parameters[11].Value = model.remark;
            parameters[12].Value = model.UpdateTime;
            parameters[13].Value = model.UpdatePerson;
            parameters[14].Value = model.ExcelServerRCID;
            parameters[15].Value = model.ExcelServerRN;
            parameters[16].Value = model.ExcelServerCN;
            parameters[17].Value = model.ExcelServerRC1;
            parameters[18].Value = model.ExcelServerWIID;
            parameters[19].Value = model.ExcelServerRTID;
            parameters[20].Value = model.ExcelServerCHG;
            parameters[21].Value = model.contrator;
            parameters[22].Value = model.AreaID;
            parameters[23].Value = model.Longitude;
            parameters[24].Value = model.latitude;
            parameters[25].Value = model.CompanyCode;
            parameters[26].Value = model.CompanyID;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.T_StationNet model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_StationNet(");
            strSql.Append("PointID,RouterIP,RouterPort,RounterUser,RounterPws,DataIP,DataPort,DataUser,DataPws,VedioIP,VideoPort,VidioID,VideoUser,VideoPws,LineNo,Vlan,NetOperator,NetType,PW,ExcelServerRCID,ExcelServerRN,ExcelServerCN,ExcelServerRC1,ExcelServerWIID,ExcelServerRTID,ExcelServerCHG)");
            strSql.Append(" values (");
            strSql.Append("@PointID,@RouterIP,@RouterPort,@RounterUser,@RounterPws,@DataIP,@DataPort,@DataUser,@DataPws,@VedioIP,@VideoPort,@VidioID,@VideoUser,@VideoPws,@LineNo,@Vlan,@NetOperator,@NetType,@PW,@ExcelServerRCID,@ExcelServerRN,@ExcelServerCN,@ExcelServerRC1,@ExcelServerWIID,@ExcelServerRTID,@ExcelServerCHG)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@PointID",         SqlDbType.Int,       4),
                new SqlParameter("@RouterIP",        SqlDbType.NVarChar, 50),
                new SqlParameter("@RouterPort",      SqlDbType.NVarChar, 50),
                new SqlParameter("@RounterUser",     SqlDbType.NVarChar, 50),
                new SqlParameter("@RounterPws",      SqlDbType.NVarChar, 50),
                new SqlParameter("@DataIP",          SqlDbType.NVarChar, 50),
                new SqlParameter("@DataPort",        SqlDbType.NVarChar, 50),
                new SqlParameter("@DataUser",        SqlDbType.NVarChar, 50),
                new SqlParameter("@DataPws",         SqlDbType.NVarChar, 50),
                new SqlParameter("@VedioIP",         SqlDbType.NVarChar, 50),
                new SqlParameter("@VideoPort",       SqlDbType.NVarChar, 50),
                new SqlParameter("@VidioID",         SqlDbType.NVarChar, 50),
                new SqlParameter("@VideoUser",       SqlDbType.NVarChar, 50),
                new SqlParameter("@VideoPws",        SqlDbType.NVarChar, 50),
                new SqlParameter("@LineNo",          SqlDbType.NVarChar, 50),
                new SqlParameter("@Vlan",            SqlDbType.NVarChar, 50),
                new SqlParameter("@NetOperator",     SqlDbType.NVarChar, 50),
                new SqlParameter("@NetType",         SqlDbType.NVarChar, 50),
                new SqlParameter("@PW",              SqlDbType.NVarChar, 25),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,       4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar, 20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.PointID;
            parameters[1].Value  = model.RouterIP;
            parameters[2].Value  = model.RouterPort;
            parameters[3].Value  = model.RounterUser;
            parameters[4].Value  = model.RounterPws;
            parameters[5].Value  = model.DataIP;
            parameters[6].Value  = model.DataPort;
            parameters[7].Value  = model.DataUser;
            parameters[8].Value  = model.DataPws;
            parameters[9].Value  = model.VedioIP;
            parameters[10].Value = model.VideoPort;
            parameters[11].Value = model.VidioID;
            parameters[12].Value = model.VideoUser;
            parameters[13].Value = model.VideoPws;
            parameters[14].Value = model.LineNo;
            parameters[15].Value = model.Vlan;
            parameters[16].Value = model.NetOperator;
            parameters[17].Value = model.NetType;
            parameters[18].Value = model.PW;
            parameters[19].Value = model.ExcelServerRCID;
            parameters[20].Value = model.ExcelServerRN;
            parameters[21].Value = model.ExcelServerCN;
            parameters[22].Value = model.ExcelServerRC1;
            parameters[23].Value = model.ExcelServerWIID;
            parameters[24].Value = model.ExcelServerRTID;
            parameters[25].Value = model.ExcelServerCHG;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #27
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.V_Station2 model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update V_Station2 set ");
            strSql.Append("AreaName=@AreaName,");
            strSql.Append("CompanyCode=@CompanyCode,");
            strSql.Append("CompanyName=@CompanyName,");
            strSql.Append("PointCode=@PointCode,");
            strSql.Append("PointCode1=@PointCode1,");
            strSql.Append("PointName=@PointName,");
            strSql.Append("PointUses=@PointUses,");
            strSql.Append("是否运维=@是否运维,");
            strSql.Append("IsPatrol=@IsPatrol,");
            strSql.Append("是否巡检=@是否巡检,");
            strSql.Append("IsContract=@IsContract,");
            strSql.Append("是否合同=@是否合同,");
            strSql.Append("PointType=@PointType,");
            strSql.Append("Name=@Name,");
            strSql.Append("OutletNo=@OutletNo,");
            strSql.Append("PassTime=@PassTime,");
            strSql.Append("EnvirLevel=@EnvirLevel,");
            strSql.Append("OperatedLevel=@OperatedLevel,");
            strSql.Append("OperatedCenter=@OperatedCenter,");
            strSql.Append("OperatedGroup=@OperatedGroup,");
            strSql.Append("Director=@Director,");
            strSql.Append("MnCode=@MnCode,");
            strSql.Append("RouterIP=@RouterIP,");
            strSql.Append("DataIP=@DataIP,");
            strSql.Append("VedioIP=@VedioIP,");
            strSql.Append("LineNo=@LineNo,");
            strSql.Append("Vlan=@Vlan,");
            strSql.Append("NetOperator=@NetOperator,");
            strSql.Append("NetType=@NetType,");
            strSql.Append("remark=@remark,");
            strSql.Append("UpdateTime=@UpdateTime,");
            strSql.Append("UpdatePerson=@UpdatePerson,");
            strSql.Append("CompanyID=@CompanyID,");
            strSql.Append("PointID=@PointID,");
            strSql.Append("AreaCode=@AreaCode,");
            strSql.Append("PointCodeB=@PointCodeB,");
            strSql.Append("frequency=@frequency,");
            strSql.Append("latitude=@latitude,");
            strSql.Append("Longitude=@Longitude,");
            strSql.Append("Pointaddress=@Pointaddress");
            strSql.Append(" where ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@AreaName",       SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyCode",    SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyName",    SqlDbType.NVarChar,  255),
                new SqlParameter("@PointCode",      SqlDbType.NVarChar,   20),
                new SqlParameter("@PointCode1",     SqlDbType.NVarChar,   20),
                new SqlParameter("@PointName",      SqlDbType.NVarChar,  255),
                new SqlParameter("@PointUses",      SqlDbType.Bit,         1),
                new SqlParameter("@是否运维",           SqlDbType.VarChar,     4),
                new SqlParameter("@IsPatrol",       SqlDbType.Bit,         1),
                new SqlParameter("@是否巡检",           SqlDbType.VarChar,     6),
                new SqlParameter("@IsContract",     SqlDbType.Bit,         1),
                new SqlParameter("@是否合同",           SqlDbType.VarChar,     2),
                new SqlParameter("@PointType",      SqlDbType.Int,         4),
                new SqlParameter("@Name",           SqlDbType.NVarChar,  100),
                new SqlParameter("@OutletNo",       SqlDbType.NVarChar,   20),
                new SqlParameter("@PassTime",       SqlDbType.DateTime),
                new SqlParameter("@EnvirLevel",     SqlDbType.NVarChar,   50),
                new SqlParameter("@OperatedLevel",  SqlDbType.NVarChar,   20),
                new SqlParameter("@OperatedCenter", SqlDbType.NVarChar,   20),
                new SqlParameter("@OperatedGroup",  SqlDbType.NVarChar,   20),
                new SqlParameter("@Director",       SqlDbType.NVarChar,   50),
                new SqlParameter("@MnCode",         SqlDbType.NVarChar,   20),
                new SqlParameter("@RouterIP",       SqlDbType.NVarChar,  255),
                new SqlParameter("@DataIP",         SqlDbType.NVarChar,  255),
                new SqlParameter("@VedioIP",        SqlDbType.NVarChar,  255),
                new SqlParameter("@LineNo",         SqlDbType.NVarChar,   50),
                new SqlParameter("@Vlan",           SqlDbType.NVarChar,   20),
                new SqlParameter("@NetOperator",    SqlDbType.NVarChar,   20),
                new SqlParameter("@NetType",        SqlDbType.NVarChar,   20),
                new SqlParameter("@remark",         SqlDbType.NVarChar,  255),
                new SqlParameter("@UpdateTime",     SqlDbType.DateTime),
                new SqlParameter("@UpdatePerson",   SqlDbType.NVarChar,   50),
                new SqlParameter("@CompanyID",      SqlDbType.Int,         4),
                new SqlParameter("@PointID",        SqlDbType.Int,         4),
                new SqlParameter("@AreaCode",       SqlDbType.NVarChar,   15),
                new SqlParameter("@PointCodeB",     SqlDbType.NVarChar,   50),
                new SqlParameter("@frequency",      SqlDbType.Int,         4),
                new SqlParameter("@latitude",       SqlDbType.NVarChar,   50),
                new SqlParameter("@Longitude",      SqlDbType.NVarChar,   50),
                new SqlParameter("@Pointaddress",   SqlDbType.NVarChar, 255)
            };
            parameters[0].Value  = model.AreaName;
            parameters[1].Value  = model.CompanyCode;
            parameters[2].Value  = model.CompanyName;
            parameters[3].Value  = model.PointCode;
            parameters[4].Value  = model.PointCode1;
            parameters[5].Value  = model.PointName;
            parameters[6].Value  = model.PointUses;
            parameters[7].Value  = model.是否运维;
            parameters[8].Value  = model.IsPatrol;
            parameters[9].Value  = model.是否巡检;
            parameters[10].Value = model.IsContract;
            parameters[11].Value = model.是否合同;
            parameters[12].Value = model.PointType;
            parameters[13].Value = model.Name;
            parameters[14].Value = model.OutletNo;
            parameters[15].Value = model.PassTime;
            parameters[16].Value = model.EnvirLevel;
            parameters[17].Value = model.OperatedLevel;
            parameters[18].Value = model.OperatedCenter;
            parameters[19].Value = model.OperatedGroup;
            parameters[20].Value = model.Director;
            parameters[21].Value = model.MnCode;
            parameters[22].Value = model.RouterIP;
            parameters[23].Value = model.DataIP;
            parameters[24].Value = model.VedioIP;
            parameters[25].Value = model.LineNo;
            parameters[26].Value = model.Vlan;
            parameters[27].Value = model.NetOperator;
            parameters[28].Value = model.NetType;
            parameters[29].Value = model.remark;
            parameters[30].Value = model.UpdateTime;
            parameters[31].Value = model.UpdatePerson;
            parameters[32].Value = model.CompanyID;
            parameters[33].Value = model.PointID;
            parameters[34].Value = model.AreaCode;
            parameters[35].Value = model.PointCodeB;
            parameters[36].Value = model.frequency;
            parameters[37].Value = model.latitude;
            parameters[38].Value = model.Longitude;
            parameters[39].Value = model.Pointaddress;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #28
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_Instrument model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_Instrument set ");
            strSql.Append("InstrumentID=@InstrumentID,");
            strSql.Append("InstrumentName=@InstrumentName,");
            strSql.Append("InstrumentModel=@InstrumentModel,");
            strSql.Append("InstrumentType=@InstrumentType,");
            strSql.Append("SupplierId=@SupplierId,");
            strSql.Append("ExcelServerRCID=@ExcelServerRCID,");
            strSql.Append("ExcelServerRN=@ExcelServerRN,");
            strSql.Append("ExcelServerCN=@ExcelServerCN,");
            strSql.Append("ExcelServerRC1=@ExcelServerRC1,");
            strSql.Append("ExcelServerWIID=@ExcelServerWIID,");
            strSql.Append("ExcelServerRTID=@ExcelServerRTID,");
            strSql.Append("ExcelServerCHG=@ExcelServerCHG,");
            strSql.Append("KingdeeId=@KingdeeId,");
            strSql.Append("InnerId=@InnerId,");
            strSql.Append("Remark=@Remark");
            strSql.Append(" where ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@InstrumentID",    SqlDbType.Int,        4),
                new SqlParameter("@InstrumentName",  SqlDbType.NVarChar, 255),
                new SqlParameter("@InstrumentModel", SqlDbType.NVarChar, 100),
                new SqlParameter("@InstrumentType",  SqlDbType.NVarChar,  50),
                new SqlParameter("@SupplierId",      SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerRCID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerRN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerCN",   SqlDbType.Int,        4),
                new SqlParameter("@ExcelServerRC1",  SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerWIID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerRTID", SqlDbType.NVarChar,  20),
                new SqlParameter("@ExcelServerCHG",  SqlDbType.Int,        4),
                new SqlParameter("@KingdeeId",       SqlDbType.NVarChar,  20),
                new SqlParameter("@InnerId",         SqlDbType.NVarChar,  20),
                new SqlParameter("@Remark",          SqlDbType.NVarChar, 255)
            };
            parameters[0].Value  = model.InstrumentID;
            parameters[1].Value  = model.InstrumentName;
            parameters[2].Value  = model.InstrumentModel;
            parameters[3].Value  = model.InstrumentType;
            parameters[4].Value  = model.SupplierId;
            parameters[5].Value  = model.ExcelServerRCID;
            parameters[6].Value  = model.ExcelServerRN;
            parameters[7].Value  = model.ExcelServerCN;
            parameters[8].Value  = model.ExcelServerRC1;
            parameters[9].Value  = model.ExcelServerWIID;
            parameters[10].Value = model.ExcelServerRTID;
            parameters[11].Value = model.ExcelServerCHG;
            parameters[12].Value = model.KingdeeId;
            parameters[13].Value = model.InnerId;
            parameters[14].Value = model.Remark;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #29
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.V_Station2 model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into V_Station2(");
            strSql.Append("AreaName,CompanyCode,CompanyName,PointCode,PointCode1,PointName,PointUses,是否运维,IsPatrol,是否巡检,IsContract,是否合同,PointType,Name,OutletNo,PassTime,EnvirLevel,OperatedLevel,OperatedCenter,OperatedGroup,Director,MnCode,RouterIP,DataIP,VedioIP,LineNo,Vlan,NetOperator,NetType,remark,UpdateTime,UpdatePerson,CompanyID,PointID,AreaCode,PointCodeB,frequency,latitude,Longitude,Pointaddress)");
            strSql.Append(" values (");
            strSql.Append("@AreaName,@CompanyCode,@CompanyName,@PointCode,@PointCode1,@PointName,@PointUses,@是否运维,@IsPatrol,@是否巡检,@IsContract,@是否合同,@PointType,@Name,@OutletNo,@PassTime,@EnvirLevel,@OperatedLevel,@OperatedCenter,@OperatedGroup,@Director,@MnCode,@RouterIP,@DataIP,@VedioIP,@LineNo,@Vlan,@NetOperator,@NetType,@remark,@UpdateTime,@UpdatePerson,@CompanyID,@PointID,@AreaCode,@PointCodeB,@frequency,@latitude,@Longitude,@Pointaddress)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@AreaName",       SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyCode",    SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyName",    SqlDbType.NVarChar,  255),
                new SqlParameter("@PointCode",      SqlDbType.NVarChar,   20),
                new SqlParameter("@PointCode1",     SqlDbType.NVarChar,   20),
                new SqlParameter("@PointName",      SqlDbType.NVarChar,  255),
                new SqlParameter("@PointUses",      SqlDbType.Bit,         1),
                new SqlParameter("@是否运维",           SqlDbType.VarChar,     4),
                new SqlParameter("@IsPatrol",       SqlDbType.Bit,         1),
                new SqlParameter("@是否巡检",           SqlDbType.VarChar,     6),
                new SqlParameter("@IsContract",     SqlDbType.Bit,         1),
                new SqlParameter("@是否合同",           SqlDbType.VarChar,     2),
                new SqlParameter("@PointType",      SqlDbType.Int,         4),
                new SqlParameter("@Name",           SqlDbType.NVarChar,  100),
                new SqlParameter("@OutletNo",       SqlDbType.NVarChar,   20),
                new SqlParameter("@PassTime",       SqlDbType.DateTime),
                new SqlParameter("@EnvirLevel",     SqlDbType.NVarChar,   50),
                new SqlParameter("@OperatedLevel",  SqlDbType.NVarChar,   20),
                new SqlParameter("@OperatedCenter", SqlDbType.NVarChar,   20),
                new SqlParameter("@OperatedGroup",  SqlDbType.NVarChar,   20),
                new SqlParameter("@Director",       SqlDbType.NVarChar,   50),
                new SqlParameter("@MnCode",         SqlDbType.NVarChar,   20),
                new SqlParameter("@RouterIP",       SqlDbType.NVarChar,  255),
                new SqlParameter("@DataIP",         SqlDbType.NVarChar,  255),
                new SqlParameter("@VedioIP",        SqlDbType.NVarChar,  255),
                new SqlParameter("@LineNo",         SqlDbType.NVarChar,   50),
                new SqlParameter("@Vlan",           SqlDbType.NVarChar,   20),
                new SqlParameter("@NetOperator",    SqlDbType.NVarChar,   20),
                new SqlParameter("@NetType",        SqlDbType.NVarChar,   20),
                new SqlParameter("@remark",         SqlDbType.NVarChar,  255),
                new SqlParameter("@UpdateTime",     SqlDbType.DateTime),
                new SqlParameter("@UpdatePerson",   SqlDbType.NVarChar,   50),
                new SqlParameter("@CompanyID",      SqlDbType.Int,         4),
                new SqlParameter("@PointID",        SqlDbType.Int,         4),
                new SqlParameter("@AreaCode",       SqlDbType.NVarChar,   15),
                new SqlParameter("@PointCodeB",     SqlDbType.NVarChar,   50),
                new SqlParameter("@frequency",      SqlDbType.Int,         4),
                new SqlParameter("@latitude",       SqlDbType.NVarChar,   50),
                new SqlParameter("@Longitude",      SqlDbType.NVarChar,   50),
                new SqlParameter("@Pointaddress",   SqlDbType.NVarChar, 255)
            };
            parameters[0].Value  = model.AreaName;
            parameters[1].Value  = model.CompanyCode;
            parameters[2].Value  = model.CompanyName;
            parameters[3].Value  = model.PointCode;
            parameters[4].Value  = model.PointCode1;
            parameters[5].Value  = model.PointName;
            parameters[6].Value  = model.PointUses;
            parameters[7].Value  = model.是否运维;
            parameters[8].Value  = model.IsPatrol;
            parameters[9].Value  = model.是否巡检;
            parameters[10].Value = model.IsContract;
            parameters[11].Value = model.是否合同;
            parameters[12].Value = model.PointType;
            parameters[13].Value = model.Name;
            parameters[14].Value = model.OutletNo;
            parameters[15].Value = model.PassTime;
            parameters[16].Value = model.EnvirLevel;
            parameters[17].Value = model.OperatedLevel;
            parameters[18].Value = model.OperatedCenter;
            parameters[19].Value = model.OperatedGroup;
            parameters[20].Value = model.Director;
            parameters[21].Value = model.MnCode;
            parameters[22].Value = model.RouterIP;
            parameters[23].Value = model.DataIP;
            parameters[24].Value = model.VedioIP;
            parameters[25].Value = model.LineNo;
            parameters[26].Value = model.Vlan;
            parameters[27].Value = model.NetOperator;
            parameters[28].Value = model.NetType;
            parameters[29].Value = model.remark;
            parameters[30].Value = model.UpdateTime;
            parameters[31].Value = model.UpdatePerson;
            parameters[32].Value = model.CompanyID;
            parameters[33].Value = model.PointID;
            parameters[34].Value = model.AreaCode;
            parameters[35].Value = model.PointCodeB;
            parameters[36].Value = model.frequency;
            parameters[37].Value = model.latitude;
            parameters[38].Value = model.Longitude;
            parameters[39].Value = model.Pointaddress;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #30
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.V_StationDev model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update V_StationDev set ");
            strSql.Append("SortId=@SortId,");
            strSql.Append("AreaName=@AreaName,");
            strSql.Append("CompanyCode=@CompanyCode,");
            strSql.Append("CompanyName=@CompanyName,");
            strSql.Append("PointCode=@PointCode,");
            strSql.Append("PointName=@PointName,");
            strSql.Append("Name=@Name,");
            strSql.Append("OperatedLevel=@OperatedLevel,");
            strSql.Append("InstrumentID=@InstrumentID,");
            strSql.Append("InstrumentName=@InstrumentName,");
            strSql.Append("InstrumentModel=@InstrumentModel,");
            strSql.Append("InstrumentType=@InstrumentType,");
            strSql.Append("InstallDate=@InstallDate,");
            strSql.Append("DevCode=@DevCode,");
            strSql.Append("DetectionPrinciple=@DetectionPrinciple,");
            strSql.Append("RangeLow=@RangeLow,");
            strSql.Append("RangeUp=@RangeUp,");
            strSql.Append("Protocol=@Protocol,");
            strSql.Append("TransmissionType=@TransmissionType,");
            strSql.Append("DevStatus=@DevStatus,");
            strSql.Append("Remark=@Remark,");
            strSql.Append("RecordFlag=@RecordFlag,");
            strSql.Append("PointID=@PointID");
            strSql.Append(" where StationDevID=@StationDevID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@SortId",             SqlDbType.Int,         4),
                new SqlParameter("@AreaName",           SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyCode",        SqlDbType.NVarChar,  255),
                new SqlParameter("@CompanyName",        SqlDbType.NVarChar,  255),
                new SqlParameter("@PointCode",          SqlDbType.NVarChar,   50),
                new SqlParameter("@PointName",          SqlDbType.NVarChar,  255),
                new SqlParameter("@Name",               SqlDbType.NVarChar,  100),
                new SqlParameter("@OperatedLevel",      SqlDbType.NVarChar,   20),
                new SqlParameter("@InstrumentID",       SqlDbType.NVarChar,   50),
                new SqlParameter("@InstrumentName",     SqlDbType.NVarChar,  255),
                new SqlParameter("@InstrumentModel",    SqlDbType.NVarChar,   50),
                new SqlParameter("@InstrumentType",     SqlDbType.NVarChar,   50),
                new SqlParameter("@InstallDate",        SqlDbType.DateTime),
                new SqlParameter("@DevCode",            SqlDbType.NVarChar,   50),
                new SqlParameter("@DetectionPrinciple", SqlDbType.NVarChar,   50),
                new SqlParameter("@RangeLow",           SqlDbType.Float,       8),
                new SqlParameter("@RangeUp",            SqlDbType.Float,       8),
                new SqlParameter("@Protocol",           SqlDbType.NVarChar,   50),
                new SqlParameter("@TransmissionType",   SqlDbType.NVarChar,   50),
                new SqlParameter("@DevStatus",          SqlDbType.NVarChar,   50),
                new SqlParameter("@Remark",             SqlDbType.NVarChar,  255),
                new SqlParameter("@RecordFlag",         SqlDbType.NVarChar,   25),
                new SqlParameter("@PointID",            SqlDbType.Int,         4),
                new SqlParameter("@StationDevID",       SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.SortId;
            parameters[1].Value  = model.AreaName;
            parameters[2].Value  = model.CompanyCode;
            parameters[3].Value  = model.CompanyName;
            parameters[4].Value  = model.PointCode;
            parameters[5].Value  = model.PointName;
            parameters[6].Value  = model.Name;
            parameters[7].Value  = model.OperatedLevel;
            parameters[8].Value  = model.InstrumentID;
            parameters[9].Value  = model.InstrumentName;
            parameters[10].Value = model.InstrumentModel;
            parameters[11].Value = model.InstrumentType;
            parameters[12].Value = model.InstallDate;
            parameters[13].Value = model.DevCode;
            parameters[14].Value = model.DetectionPrinciple;
            parameters[15].Value = model.RangeLow;
            parameters[16].Value = model.RangeUp;
            parameters[17].Value = model.Protocol;
            parameters[18].Value = model.TransmissionType;
            parameters[19].Value = model.DevStatus;
            parameters[20].Value = model.Remark;
            parameters[21].Value = model.RecordFlag;
            parameters[22].Value = model.PointID;
            parameters[23].Value = model.StationDevID;

            int rows = DbBaseHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }