/// <summary>
        ///根据SQL语句获取集合
        /// </summary>
        private IList <Tbl_FlowWorkLog> getTbl_FlowWorkLogsBySql(string sql)
        {
            IList <Tbl_FlowWorkLog> list = new List <Tbl_FlowWorkLog>();
            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_FlowWorkLog tbl_FlowWorkLog = new Tbl_FlowWorkLog();
                    tbl_FlowWorkLog.ID         = Convert.ToInt32(dr["ID"]);
                    tbl_FlowWorkLog.UserName   = Convert.ToString(dr["UserName"]);
                    tbl_FlowWorkLog.LogType    = Convert.ToString(dr["LogType"]);
                    tbl_FlowWorkLog.ParentID   = Convert.ToInt32(dr["ParentID"]);
                    tbl_FlowWorkLog.ProjectID  = Convert.ToInt32(dr["ProjectID"]);
                    tbl_FlowWorkLog.FlowID     = Convert.ToInt32(dr["FlowID"]);
                    tbl_FlowWorkLog.FlowWorkID = Convert.ToInt32(dr["FlowWorkID"]);
                    tbl_FlowWorkLog.FlowNodeID = Convert.ToInt32(dr["FlowNodeID"]);
                    tbl_FlowWorkLog.FileLog    = Convert.ToString(dr["FileLog"]);
                    tbl_FlowWorkLog.Remark     = Convert.ToString(dr["Remark"]);
                    tbl_FlowWorkLog.DealFlag   = Convert.ToInt32(dr["DealFlag"]);
                    tbl_FlowWorkLog.DealTime   = Convert.ToDateTime(dr["DealTime"]);
                    tbl_FlowWorkLog.DealUser   = Convert.ToString(dr["DealUser"]);
                    tbl_FlowWorkLog.AddDate    = Convert.ToDateTime(dr["AddDate"]);
                    list.Add(tbl_FlowWorkLog);
                }
            }
            return(list);
        }
 public static int UpdateTbl_FlowWorkLog(Tbl_FlowWorkLog tbl_FlowWorkLog)
 {
     WebCommon.Public.WriteLog("修改设计文件:" + tbl_FlowWorkLog.ProjectID);
     tbl_FlowWorkLog.DealUser = WebCommon.Public.GetUserName();
     tbl_FlowWorkLog.DealTime = DateTime.Now;
     return(new Tbl_FlowWorkLogService().UpdateTbl_FlowWorkLogById(tbl_FlowWorkLog));
 }
        public int UpdateTbl_FlowWorkLogById(Tbl_FlowWorkLog tbl_FlowWorkLog)
        {
            string sql = "update [Tbl_FlowWorkLog] set [UserName]=@UserName,[LogType]=@LogType,[ProjectID]=@ProjectID,[FlowID]=@FlowID,[FlowWorkID]=@FlowWorkID,[FlowNodeID]=@FlowNodeID,[FileLog]=@FileLog,[Remark]=@Remark,[DealUser]=@DealUser where DealFlag=0 and [ID]=@ID";

            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@ID", tbl_FlowWorkLog.ID),
                new SqlParameter("@LogType", tbl_FlowWorkLog.LogType),
                new SqlParameter("@UserName", tbl_FlowWorkLog.UserName),
                new SqlParameter("@ProjectID", tbl_FlowWorkLog.ProjectID),
                new SqlParameter("@FlowID", tbl_FlowWorkLog.FlowID),
                new SqlParameter("@FlowWorkID", tbl_FlowWorkLog.FlowWorkID),
                new SqlParameter("@FlowNodeID", tbl_FlowWorkLog.FlowNodeID),
                new SqlParameter("@FileLog", tbl_FlowWorkLog.FileLog),
                new SqlParameter("@Remark", tbl_FlowWorkLog.Remark),
                new SqlParameter("@DealUser", tbl_FlowWorkLog.DealUser)
            };
            return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, sql, sp));
        }
        public int AddTbl_FlowWorkLog(Tbl_FlowWorkLog tbl_FlowWorkLog)
        {
            string sql = "insert into [Tbl_FlowWorkLog] ([UserName],[LogType],[ParentID],[ProjectID],[FlowID],[FlowWorkID],[FlowNodeID],[FileLog],[Remark],[DealUser]) values (@UserName,@LogType,@ParentID,@ProjectID,@FlowID,@FlowWorkID,@FlowNodeID,@FileLog,@Remark,@DealUser)";

            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@UserName", tbl_FlowWorkLog.UserName),
                new SqlParameter("@LogType", tbl_FlowWorkLog.LogType),
                new SqlParameter("@ParentID", tbl_FlowWorkLog.ParentID),
                new SqlParameter("@ProjectID", tbl_FlowWorkLog.ProjectID),
                new SqlParameter("@FlowID", tbl_FlowWorkLog.FlowID),
                new SqlParameter("@FlowWorkID", tbl_FlowWorkLog.FlowWorkID),
                new SqlParameter("@FlowNodeID", tbl_FlowWorkLog.FlowNodeID),
                new SqlParameter("@FileLog", tbl_FlowWorkLog.FileLog),
                new SqlParameter("@Remark", tbl_FlowWorkLog.Remark),
                new SqlParameter("@DealUser", tbl_FlowWorkLog.DealUser)
            };
            return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, sql, sp));
        }
 public static int AddTbl_FlowWorkLog(Tbl_FlowWorkLog tbl_FlowWorkLog)
 {
     WebCommon.Public.WriteLog("添加设计文件:" + tbl_FlowWorkLog.ProjectID);
     return(new Tbl_FlowWorkLogService().AddTbl_FlowWorkLog(tbl_FlowWorkLog));
 }