Пример #1
0
        public void DelTMLeave(LCSite.InputTMLeave TMLeave)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from Tab_Site_TMLeave ");
            strSql.Append(" where strid = @strid ");
            using (var conn = GetConnection())
            {
                conn.Execute(strSql.ToString(), new { strid = TMLeave.strid });
            }
        }
Пример #2
0
        public void AddTMLeave(LCSite.InputTMLeave TMLeave)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into Tab_Site_TMLeave");
            strSql.Append("(strLeaveRemark,nEndLeaveLoginType,strName,nEndLeaveAdminLoginType,strTrainmanID,nAdminLoginType,strTimeOutReason,strEndAdminPhotoID,nTimeOutMinute,strAdminPhotoID,nIsEndLeave,strUserNumber,strLeavePhotoID,nSiteID,dtLeaveTime,strEndLeaveName,strSiteName,strEndLeavePhotoID,dtEndLeaveTime,strNumber,nLeaveLoginType,strid,strUserID,strUserName,strEndLeaveTestAlcoholID,nIsTimeOut,strEndLeaveNumber,dtLeaveCount,nTestAlcoholResult,strEndLeaveAdminID)");
            strSql.Append("values(@strLeaveRemark,@nEndLeaveLoginType,@strName,@nEndLeaveAdminLoginType,@strTrainmanID,@nAdminLoginType,@strTimeOutReason,@strEndAdminPhotoID,@nTimeOutMinute,@strAdminPhotoID,@nIsEndLeave,@strUserNumber,@strLeavePhotoID,@nSiteID,@dtLeaveTime,@strEndLeaveName,@strSiteName,@strEndLeavePhotoID,@dtEndLeaveTime,@strNumber,@nLeaveLoginType,@strid,@strUserID,@strUserName,@strEndLeaveTestAlcoholID,@nIsTimeOut,@strEndLeaveNumber,@dtLeaveCount,@nTestAlcoholResult,@strEndLeaveAdminID)");
            using (var conn = GetConnection())
            {
                conn.Execute(strSql.ToString(), TMLeave);
            }
        }
Пример #3
0
        public void UpdateTMLeave(LCSite.InputTMLeave TMLeave)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("Update Tab_Site_TMLeave set ");
            strSql.Append(" strLeaveRemark = @strLeaveRemark, ");
            strSql.Append(" nEndLeaveLoginType = @nEndLeaveLoginType, ");
            strSql.Append(" strName = @strName, ");
            strSql.Append(" nEndLeaveAdminLoginType = @nEndLeaveAdminLoginType, ");
            strSql.Append(" strTrainmanID = @strTrainmanID, ");
            strSql.Append(" nAdminLoginType = @nAdminLoginType, ");
            strSql.Append(" strTimeOutReason = @strTimeOutReason, ");
            strSql.Append(" strEndAdminPhotoID = @strEndAdminPhotoID, ");
            strSql.Append(" nTimeOutMinute = @nTimeOutMinute, ");
            strSql.Append(" strAdminPhotoID = @strAdminPhotoID, ");
            strSql.Append(" nIsEndLeave = @nIsEndLeave, ");
            strSql.Append(" strUserNumber = @strUserNumber, ");
            strSql.Append(" strLeavePhotoID = @strLeavePhotoID, ");
            strSql.Append(" nSiteID = @nSiteID, ");
            strSql.Append(" dtLeaveTime = @dtLeaveTime, ");
            strSql.Append(" strEndLeaveName = @strEndLeaveName, ");
            strSql.Append(" strSiteName = @strSiteName, ");
            strSql.Append(" strEndLeavePhotoID = @strEndLeavePhotoID, ");
            strSql.Append(" dtEndLeaveTime = @dtEndLeaveTime, ");
            strSql.Append(" strNumber = @strNumber, ");
            strSql.Append(" nLeaveLoginType = @nLeaveLoginType, ");
            strSql.Append(" strUserID = @strUserID, ");
            strSql.Append(" strUserName = @strUserName, ");
            strSql.Append(" strEndLeaveTestAlcoholID = @strEndLeaveTestAlcoholID, ");
            strSql.Append(" nIsTimeOut = @nIsTimeOut, ");
            strSql.Append(" strEndLeaveNumber = @strEndLeaveNumber, ");
            strSql.Append(" dtLeaveCount = @dtLeaveCount, ");
            strSql.Append(" nTestAlcoholResult = @nTestAlcoholResult, ");
            strSql.Append(" strEndLeaveAdminID = @strEndLeaveAdminID ");
            strSql.Append(" where strid = @strid ");
            using (var conn = GetConnection())
            {
                conn.Execute(strSql.ToString(), TMLeave);
            }
        }