* Web.csproj:
* Profile.aspx: * MyProfile.aspx: * AccountController.cs: renamed the Profile method to "MyProfile", could avoid issue at migrating to MVC5 * favicon.png: favicon now displays a ~"Yavsc" * BlogManager.cs: * BlogsApiController.cs: The authorisation for removing a post is now implemented at Manager's side * BlogsController.cs: Removes this odd call to a static method from the Api controller * CalendarApi.cs: * GoogleController.cs: no more json output for the calls to the Google Api * WorkFlowController.cs: sorted using clauses * Basket.cs: * Commande.cs: * EstimToPdfFormatter.cs: * Brand.cs: adds xml doc * RssFeedsFormatter.cs: modifies xml doc * TexToPdfFormatter.cs: refactoring * Global.asax.cs: Document formatting * BBCodeHelper.cs: encapsulates the url display from the BBCode in starting and closing characters : "<>" * OAuth2.cs: * SimpleJsonPostMethod.cs: using System.Runtime.Serialization.Json instead of Newtonsof.Json * App.master: updating the favicon * RegistrationPending.aspx: fixes the returnUrl usage * AssemblyInfo.aspx: better explanation for this list * Web.config: tried to migrate to MVC5 (using NuGets) * Estim.cs: * ChangePasswordModel.cs: adds xmldoc * BasketController.cs: * BlogProvidersConfigurationSection.cs: cosmetic change * GoogleErrorMessage.cs: - adds xml docs - renders ctor from JsonReaderException obsolete * MvcActionValueBinder.cs: not used * web.config: no more used, gave it up to migrate to MVC5
This commit is contained in:
parent
a342b744df
commit
e676d2fdbf
31 changed files with 246 additions and 234 deletions
|
|
@ -20,14 +20,15 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http.Formatting;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
using System.Web.Profile;
|
||||
using System.Web;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Web;
|
||||
using System.Web.Profile;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
using Yavsc.Model.WorkFlow;
|
||||
|
||||
namespace Yavsc.Formatters
|
||||
{
|
||||
|
|
@ -69,8 +70,9 @@ namespace Yavsc.Formatters
|
|||
return enumerableType.IsAssignableFrom(type);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes to stream.
|
||||
/// Writes synchronously to the buffered stream.
|
||||
/// </summary>
|
||||
/// <param name="type">Type.</param>
|
||||
/// <param name="value">Value.</param>
|
||||
|
|
@ -97,7 +99,7 @@ namespace Yavsc.Formatters
|
|||
tmpe.Session.Add ("to", prcli);
|
||||
tmpe.Init ();
|
||||
|
||||
string content = tmpe.TransformText ();
|
||||
string contentStr = tmpe.TransformText ();
|
||||
|
||||
string name = string.Format ("tmpestimtex-{0}", e.Id);
|
||||
string fullname = Path.Combine (
|
||||
|
|
@ -106,7 +108,7 @@ namespace Yavsc.Formatters
|
|||
FileInfo fo = new FileInfo(fullname + ".pdf");
|
||||
using (StreamWriter sw = new StreamWriter (fi.FullName))
|
||||
{
|
||||
sw.Write (content);
|
||||
sw.Write (contentStr);
|
||||
}
|
||||
using (Process p = new Process ()) {
|
||||
p.StartInfo.WorkingDirectory = HttpRuntime.CodegenDir;
|
||||
|
|
@ -129,8 +131,10 @@ namespace Yavsc.Formatters
|
|||
}
|
||||
fi.Delete();
|
||||
fo.Delete();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace Yavsc.Formatters
|
|||
|
||||
private const string dateformat = "ddd, dd MMM yyyy HH:mm:ss K";
|
||||
/// <summary>
|
||||
/// Writes to stream.
|
||||
/// Writes synchronously to the buffered stream.
|
||||
/// </summary>
|
||||
/// <param name="type">Type.</param>
|
||||
/// <param name="value">Value.</param>
|
||||
|
|
|
|||
|
|
@ -25,9 +25,13 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Diagnostics;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Yavsc.Formatters
|
||||
{
|
||||
/// <summary>
|
||||
/// Tex to pdf formatter.
|
||||
/// </summary>
|
||||
public class TexToPdfFormatter: BufferedMediaTypeFormatter
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -73,7 +77,7 @@ namespace Yavsc.Formatters
|
|||
public override void WriteToStream (Type type, object value, Stream stream, HttpContentHeaders contentHeaders)
|
||||
{
|
||||
|
||||
string content = value as string;
|
||||
string cntStr = value as string;
|
||||
string name = "tmpdoc-"+Guid.NewGuid().ToString();
|
||||
string fullname = Path.Combine (
|
||||
HttpRuntime.CodegenDir, name);
|
||||
|
|
@ -81,7 +85,7 @@ namespace Yavsc.Formatters
|
|||
FileInfo fo = new FileInfo(fullname + ".pdf");
|
||||
using (StreamWriter sw = new StreamWriter (fi.FullName))
|
||||
{
|
||||
sw.Write (content);
|
||||
sw.Write (cntStr);
|
||||
}
|
||||
using (Process p = new Process ()) {
|
||||
p.StartInfo.WorkingDirectory = HttpRuntime.CodegenDir;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue