public static int DeleteTbl_OutFile(int ID)
        {
            Tbl_OutFile tbl_outfile = GetTbl_OutFileById(ID);

            WebCommon.Public.WriteLog("删除外来资料:" + WebCommon.Public.CutStr(tbl_outfile.ProjectID.ToString() + "|" + tbl_outfile.ClassName.ToString() + "|" + tbl_outfile.FileName.ToString() + "|" + tbl_outfile.FileUrl.ToString() + "|" + tbl_outfile.FileInfo.ToString() + "|" + tbl_outfile.DealUser.ToString() + "|" + tbl_outfile.DealFlag.ToString() + "|" + tbl_outfile.DealTime.ToString() + "|" + tbl_outfile.AddDate.ToString() + "|" + "", 100));
            return(new Tbl_OutFileService().DeleteTbl_OutFileById(ID));
        }
Beispiel #2
0
        /// <summary>
        ///根据Sql语句返回集合
        /// </summary>
        private IList <Tbl_OutFile> getTbl_OutFilesBySql(string Sql)
        {
            IList <Tbl_OutFile> list = new List <Tbl_OutFile>();
            DataSet             ds   = DBHelper.ExecuteDataset(this.connection, CommandType.Text, Sql);

            if (ds.Tables.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                foreach (DataRow dr in dt.Rows)
                {
                    Tbl_OutFile tbl_outfile = new Tbl_OutFile();
                    tbl_outfile.ID        = Convert.ToInt32(dr["ID"]);
                    tbl_outfile.ProjectID = Convert.ToString(dr["ProjectID"]);
                    tbl_outfile.ClassName = Convert.ToString(dr["ClassName"]);
                    tbl_outfile.FileName  = Convert.ToString(dr["FileName"]);
                    tbl_outfile.FileUrl   = Convert.ToString(dr["FileUrl"]);
                    tbl_outfile.FileInfo  = Convert.ToString(dr["FileInfo"]);
                    tbl_outfile.DealUser  = Convert.ToString(dr["DealUser"]);
                    tbl_outfile.DealFlag  = Convert.ToInt32(dr["DealFlag"]);
                    tbl_outfile.DealTime  = Convert.ToDateTime(dr["DealTime"]);
                    tbl_outfile.AddDate   = Convert.ToDateTime(dr["AddDate"]);
                    list.Add(tbl_outfile);
                }
            }
            return(list);
        }
Beispiel #3
0
        public int AddTbl_OutFile(Tbl_OutFile tbl_outfile)
        {
            string Sql = "insert into [Tbl_OutFile] ([ProjectID],[ClassName],[FileName],[FileUrl],[FileInfo],[DealUser],[DealFlag],[DealTime],[AddDate]) values (@ProjectID,@ClassName,@FileName,@FileUrl,@FileInfo,@DealUser,@DealFlag,@DealTime,@AddDate)";

            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@ProjectID", tbl_outfile.ProjectID),
                new SqlParameter("@ClassName", tbl_outfile.ClassName),
                new SqlParameter("@FileName", tbl_outfile.FileName),
                new SqlParameter("@FileUrl", tbl_outfile.FileUrl),
                new SqlParameter("@FileInfo", tbl_outfile.FileInfo),
                new SqlParameter("@DealUser", tbl_outfile.DealUser),
                new SqlParameter("@DealFlag", tbl_outfile.DealFlag),
                new SqlParameter("@DealTime", tbl_outfile.DealTime),
                new SqlParameter("@AddDate", tbl_outfile.AddDate)
            };
            return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, Sql, sp));
        }
Beispiel #4
0
        public int UpdateTbl_OutFileById(Tbl_OutFile tbl_outfile)
        {
            string Sql = "update [Tbl_OutFile] set [ProjectID]=@ProjectID,[ClassName]=@ClassName,[FileName]=@FileName,[FileUrl]=@FileUrl,[FileInfo]=@FileInfo,[DealUser]=@DealUser,[DealFlag]=@DealFlag,[DealTime]=@DealTime,[AddDate]=@AddDate where [ID]=@ID";

            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@ProjectID", tbl_outfile.ProjectID),
                new SqlParameter("@ClassName", tbl_outfile.ClassName),
                new SqlParameter("@FileName", tbl_outfile.FileName),
                new SqlParameter("@FileUrl", tbl_outfile.FileUrl),
                new SqlParameter("@FileInfo", tbl_outfile.FileInfo),
                new SqlParameter("@DealUser", tbl_outfile.DealUser),
                new SqlParameter("@DealFlag", tbl_outfile.DealFlag),
                new SqlParameter("@DealTime", tbl_outfile.DealTime),
                new SqlParameter("@AddDate", tbl_outfile.AddDate),
                new SqlParameter("@ID", tbl_outfile.ID)
            };
            return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, Sql, sp));
        }
 public static int UpdateTbl_OutFile(Tbl_OutFile tbl_outfile)
 {
     WebCommon.Public.WriteLog("修改外来资料:" + WebCommon.Public.CutStr(tbl_outfile.ProjectID.ToString() + "|" + tbl_outfile.ClassName.ToString() + "|" + tbl_outfile.FileName.ToString() + "|" + tbl_outfile.FileUrl.ToString() + "|" + tbl_outfile.FileInfo.ToString() + "|" + tbl_outfile.DealUser.ToString() + "|" + tbl_outfile.DealFlag.ToString() + "|" + tbl_outfile.DealTime.ToString() + "|" + tbl_outfile.AddDate.ToString() + "|" + "", 100));
     return(new Tbl_OutFileService().UpdateTbl_OutFileById(tbl_outfile));
 }