Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions IM.Console/IM.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="SuperSocket.SocketEngine">
<HintPath>..\IMChat\bin\Debug\SuperSocket.SocketEngine.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand Down
5 changes: 3 additions & 2 deletions IMChat/WebChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ namespace IMChat
{
public class WebChat : IDisposable
{
private const int port = 2014;
//private const int port = 8090;
private const int port = 32090;

public WebSocketServer ws { get; set; }//SuperWebSocket中的WebSocketServer对象

public Dictionary<string, MessageModule> Modules { get; set; }

public WebChat()
{
Magic.Mvc.DataAccessProvider.Current = new Magic.Mvc.DataAccess(@"Data Source=dreamzoom-pc\sqlexpress;Initial Catalog=db_MedicalCrab;Persist Security Info=True;User ID=sa;Password=123456");
Magic.Mvc.DataAccessProvider.Current = new Magic.Mvc.DataAccess(@"Data Source=localhost;Initial Catalog=db_MedicalCrab;Persist Security Info=True;User ID=sa;Password=YG201507");

ws = new WebSocketServer();
// ws.NewSessionConnected += ws_NewSessionConnected;
Expand Down
7 changes: 2 additions & 5 deletions Magic.MeiChat/Magic.MeiChat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@
<Reference Include="System.Data" />
<Reference Include="System.Data.Entity" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" />
Expand Down Expand Up @@ -95,10 +96,6 @@
<Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.4.0.30506.0\lib\net40\System.Web.Http.WebHost.dll</HintPath>
</Reference>
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.AspNet.Mvc.4.0.30506.0\lib\net40\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Optimization">
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.0.0\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference>
Expand Down
2 changes: 1 addition & 1 deletion Magic.MeiChat/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</configSections>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-Magic.MeiChat-20150426213349;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-Magic.MeiChat-20150426213349.mdf" providerName="System.Data.SqlClient" />
<add name="ConnectionString" connectionString="Data Source=dreamzoom-pc\sqlexpress;Initial Catalog=test;Persist Security Info=True;User ID=sa;Password=123456"/>
<add name="ConnectionString" connectionString="Data Source=localhost;Initial Catalog=db_MedicalCrab;Persist Security Info=True;User ID=sa;Password=123456"/>
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="2.0.0.0" />
Expand Down
10 changes: 5 additions & 5 deletions Magic.Mvc/Magic.Mvc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Mvc.dll</HintPath>
</Reference>
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down Expand Up @@ -83,7 +81,9 @@
<Compile Include="SqlProviders.cs" />
<Compile Include="TabledList.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
2 changes: 1 addition & 1 deletion Magic.Mvc/SqlProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public string CreatePagingSql(int _recordCount, int _pageSize, int _pageIndex, s
//SELECT ROW_NUMBER() OVER(ORDER by UserName asc) AS rownumber,*
//FROM (SELECT [UserName],[Password] FROM [User]) T
//) TT WHERE rownumber BETWEEN 0 AND 0
string sql = @"SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER By ID) AS rownumber,* FROM ({1}) T ) TT WHERE rownumber BETWEEN {2} AND {3}";
string sql = @"SELECT * FROM (SELECT ROW_NUMBER() OVER(ORDER By {0}) AS rownumber,* FROM ({1}) T ) TT WHERE rownumber BETWEEN {2} AND {3}";
return string.Format(sql, _orderField, _safeSql, start, end);
}

Expand Down
3 changes: 3 additions & 0 deletions Magic.Mvc/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
</configuration>
10 changes: 10 additions & 0 deletions MedicalCrab.Core/MedicalCrab.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,20 @@
<Compile Include="Models\Message.cs" />
<Compile Include="Models\MsgType.cs" />
<Compile Include="Models\PositionLog.cs" />
<Compile Include="Models\tNewsComment.cs" />
<Compile Include="Models\tPublicNews.cs" />
<Compile Include="Models\tPublicNum.cs" />
<Compile Include="Models\tPublicRelation.cs" />
<Compile Include="Models\vGetUserPublicNum.cs" />
<Compile Include="Models\vNearUserPosition.cs" />
<Compile Include="Services\DynamicService.cs" />
<Compile Include="Services\MessageService.cs" />
<Compile Include="Services\PositionLogService.cs" />
<Compile Include="Services\tNewsComment.cs" />
<Compile Include="Services\tPublicNews.cs" />
<Compile Include="Services\tPublicNum.cs" />
<Compile Include="Services\tPublicRelation.cs" />
<Compile Include="Services\vGetUserPublicNum.cs" />
<Compile Include="Services\vNearUserPositionService.cs" />
<Compile Include="Uploader.cs" />
<Compile Include="Models\User.cs" />
Expand Down
87 changes: 87 additions & 0 deletions MedicalCrab.Core/Models/tNewsComment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using Magic.Mvc.Model;
namespace MedicalCrab.Core.Models{
//新闻评论表
public class tNewsComment:Magic.Mvc.Model.Model
{

/// <summary>
/// Id
/// </summary>
//private string _id;
//public string Id
//{
// get{ return _id; }
// set{ _id = value; }
//}
/// <summary>
/// 序号
/// </summary>
private int _findexno;
[IdentifyAttribute]
public int fIndexNo
{
get{ return _findexno; }
set{ _findexno = value; }
}
/// <summary>
/// 新闻ID
/// </summary>
private string _fnewsid;
public string fNewsId
{
get{ return _fnewsid; }
set{ _fnewsid = value; }
}
/// <summary>
/// 用户ID
/// </summary>
private string _fuserid;
public string fUserId
{
get{ return _fuserid; }
set{ _fuserid = value; }
}
/// <summary>
/// 评论
/// </summary>
private string _fcomment;
public string fComment
{
get{ return _fcomment; }
set{ _fcomment = value; }
}
/// <summary>
/// 回复用户ID
/// </summary>
private string _freplayid;
public string fReplayId
{
get{ return _freplayid; }
set{ _freplayid = value; }
}
/// <summary>
/// fAddTime
/// </summary>
private DateTime _faddtime;
public DateTime fAddTime
{
get{ return _faddtime; }
set{ _faddtime = value; }
}
/// <summary>
/// 备注
/// </summary>
private string _fbz;
public string fBZ
{
get{ return _fbz; }
set{ _fbz = value; }
}

}
}

78 changes: 78 additions & 0 deletions MedicalCrab.Core/Models/tPublicNews.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using Magic.Mvc.Model;
namespace MedicalCrab.Core.Models{
//tPublicNews
public class tPublicNews:Magic.Mvc.Model.Model
{

/// <summary>
/// Id
/// </summary>
//private string _id;
//public string Id
//{
// get{ return _id; }
// set{ _id = value; }
//}
/// <summary>
/// fIndexNo
/// </summary>
private int _findexno;
[IdentifyAttribute]
public int fIndexNo
{
get{ return _findexno; }
set{ _findexno = value; }
}
/// <summary>
/// 公众号ID
/// </summary>
private string _fpubilcnumid;
public string fPubilcNumId
{
get{ return _fpubilcnumid; }
set{ _fpubilcnumid = value; }
}
/// <summary>
/// fContent
/// </summary>
private string _fcontent;
public string fContent
{
get{ return _fcontent; }
set{ _fcontent = value; }
}
/// <summary>
/// 状态(0--正常&&1--删除)
/// </summary>
private int _fstate;
public int fState
{
get{ return _fstate; }
set{ _fstate = value; }
}
/// <summary>
/// fAddTime
/// </summary>
private DateTime _faddtime;
public DateTime fAddTime
{
get{ return _faddtime; }
set{ _faddtime = value; }
}
/// <summary>
/// 备注
/// </summary>
private string _fbz;
public string fBZ
{
get{ return _fbz; }
set{ _fbz = value; }
}

}
}

Loading