|
@@ -9,6 +9,8 @@ using System.Reflection;
|
|
|
using System.Threading.Tasks;
|
|
|
using HyperCube.Models;
|
|
|
using Console = HyperCube.Utils.AdvConsole;
|
|
|
+using System.Net;
|
|
|
+
|
|
|
|
|
|
namespace HyperCube.Pages
|
|
|
{
|
|
@@ -90,9 +92,20 @@ namespace HyperCube.Pages
|
|
|
//int count = await articleModel.GetEditsCount();
|
|
|
//int countbyid = await articleModel.GetEditsCount(currentAcc.UUID);
|
|
|
//header += $", uuid:{currentAcc.UUID}, name: {currentAcc.Name}, edits count:{count}, count by accid: {countbyid}";
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ public async Task<string> NewProjectSmopp(long articleId)
|
|
|
+ {
|
|
|
+ WebRequest wrGETURL;
|
|
|
+ wrGETURL = WebRequest.Create("http://dev.prmsys.net/makeproject.php?pt=232&aid="+ articleId);
|
|
|
+ var response = await wrGETURL.GetResponseAsync();
|
|
|
+ Stream dataStream = response.GetResponseStream();
|
|
|
|
|
|
+ StreamReader reader = new StreamReader(dataStream);
|
|
|
|
|
|
+ string rt = reader.ReadToEnd();
|
|
|
+ return rt;
|
|
|
+ }
|
|
|
|
|
|
private async Task HandleValidSubmit()
|
|
|
{
|
|
@@ -118,6 +131,7 @@ namespace HyperCube.Pages
|
|
|
$"VALUES ('{articleModel.Filename}', '{articleModel.Name}', '{articleModel.Authors}', '{articleModel.PublishDate.ToString("yyyy-MM-dd")}'," +
|
|
|
$"'{articleModel.Annotation}', '{articleModel.Keywords}')";
|
|
|
id = dbCon.SQLInsert(stringSQL);
|
|
|
+ NewProjectSmopp(id);
|
|
|
}
|
|
|
|
|
|
///temp
|