QiFeng.ZWY.Dal/DalExt/TravelsExtDal.cs
(开头部分) 17KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using QiFeng.LMSD.DBUtility;
using QiFeng.LMSD.Model;
using QiFeng.LMSD.Model.EnumModel;
using QiFeng.LMSD.Utility;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace QiFeng.LMSD.Dal.DalExt
{
public class TravelsExtDal : BaseDal<TravelsExtDal>
{
public static object editTrabelLocker = new object();
#region 实现
public int EditTravels(int consumerId, int tId, int savingType, string title, List<string> content, string defaultPic)
{
var result = 0;
if (consumerId == 0)
throw new FormatException("用户Id不正确");
if (string.IsNullOrEmpty(title))
throw new FormatException("游记标题不可为空");
if (content == null || content.Count <= 0)
throw new FormatException("游记内容不可为空");
if (string.IsNullOrEmpty(defaultPic))
throw new FormatException("游记封面不可为空");
var type = new TravelsSavaType();
if (Enum.IsDefined(typeof(TravelsSavaType), savingType))
type = (TravelsSavaType)Enum.ToObject(typeof(TravelsSavaType), savingType);
else
type = TravelsSavaType.Draft;
var nowDate = DateTime.Now;
var tempPath = ConfigurationManager.AppSettings["ImgFileUploadPath"];
var tempSitePath = ConfigurationManager.AppSettings["ImgFileSitePath"];
var tempPath2 = "/TravelsComment/" + nowDate.Year + "/" + nowDate.Month + "/" + nowDate.Day;
var imgList = new List<string>();
try
{
if (content != null && content.Count > 0)
{
var files = HttpContext.Current.Request.Files;
lock (editTrabelLocker)
{
for (int i = 0; i < content.Count; i++)
{
if (!string.IsNullOrEmpty(content[i]))
{
后面还有 338 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。