Commit 65445ce5 by Urvil Shah

more Beautify.

parent 0e5286d6
Pipeline #7263 passed with stages
in 22 minutes 46 seconds
...@@ -64,7 +64,7 @@ namespace Mobile.Search.Web.Controllers ...@@ -64,7 +64,7 @@ namespace Mobile.Search.Web.Controllers
{ {
html = value.AsString(); html = value.AsString();
} }
templateDict.Add(document["templateKey"].AsString(),html); templateDict.Add(document["templateKey"].AsString(), html);
} }
// sort dictionary // sort dictionary
...@@ -75,7 +75,7 @@ namespace Mobile.Search.Web.Controllers ...@@ -75,7 +75,7 @@ namespace Mobile.Search.Web.Controllers
// GET: Template/Create // GET: Template/Create
public ActionResult Create() public ActionResult Create()
{ {
return View("Edit", new KeyValuePair<string,string>(Chronos.GenerateRandom.String(6), "<html></html>")); return View("Edit", new KeyValuePair<string, string>(Chronos.GenerateRandom.String(6), "<html></html>"));
} }
public ActionResult CreateFroala() public ActionResult CreateFroala()
{ {
...@@ -99,7 +99,7 @@ namespace Mobile.Search.Web.Controllers ...@@ -99,7 +99,7 @@ namespace Mobile.Search.Web.Controllers
// GET: Template/Edit/5 // GET: Template/Edit/5
public ActionResult Edit( string templateKey) public ActionResult Edit(string templateKey)
{ {
var json = _dynamoClient.Get("prd_2click_templates", "templateKey", templateKey); var json = _dynamoClient.Get("prd_2click_templates", "templateKey", templateKey);
var j = JObject.Parse(json); var j = JObject.Parse(json);
...@@ -159,7 +159,7 @@ namespace Mobile.Search.Web.Controllers ...@@ -159,7 +159,7 @@ namespace Mobile.Search.Web.Controllers
while (m.Success) while (m.Success)
{ {
string to_replace = String.Format("{{{{WrapUrl('{0}')}}}}", m.Groups[1]); string to_replace = String.Format("{{{{WrapUrl('{0}')}}}}", m.Groups[1]);
value=value.Replace(m.Groups[1].Value, to_replace); value = value.Replace(m.Groups[1].Value, to_replace);
m = m.NextMatch(); m = m.NextMatch();
} }
var d = new Dictionary<string, object> var d = new Dictionary<string, object>
...@@ -171,7 +171,7 @@ namespace Mobile.Search.Web.Controllers ...@@ -171,7 +171,7 @@ namespace Mobile.Search.Web.Controllers
if (isSendEmail) if (isSendEmail)
{ {
if(sendEmail(value, EmailId)) if (sendEmail(value, EmailId))
{ {
return Json(new { status = "Success" }); return Json(new { status = "Success" });
} }
...@@ -186,7 +186,7 @@ namespace Mobile.Search.Web.Controllers ...@@ -186,7 +186,7 @@ namespace Mobile.Search.Web.Controllers
{ {
_dynamoClient.WriteSingle("prd_2click_templates", d); _dynamoClient.WriteSingle("prd_2click_templates", d);
} }
url = url+ key; url = url + key;
return Redirect(url); return Redirect(url);
...@@ -198,13 +198,13 @@ namespace Mobile.Search.Web.Controllers ...@@ -198,13 +198,13 @@ namespace Mobile.Search.Web.Controllers
} }
} }
public ActionResult SendEmail(string value,string EmailId) public ActionResult SendEmail(string value, string EmailId)
{ {
return View(); return View();
} }
public bool sendEmail(string value,string email_id) public bool sendEmail(string value, string email_id)
{ {
MailAddress from = new MailAddress(FromEmail, "TemplateTest"); MailAddress from = new MailAddress(FromEmail, "TemplateTest");
MailAddress to = new MailAddress(email_id); MailAddress to = new MailAddress(email_id);
...@@ -216,7 +216,7 @@ namespace Mobile.Search.Web.Controllers ...@@ -216,7 +216,7 @@ namespace Mobile.Search.Web.Controllers
client.Port = Port; client.Port = Port;
if(email_id.Contains("minbox")) if (email_id.Contains("minbox"))
{ {
client.Host = SmtpMinboxHost; client.Host = SmtpMinboxHost;
...@@ -224,7 +224,7 @@ namespace Mobile.Search.Web.Controllers ...@@ -224,7 +224,7 @@ namespace Mobile.Search.Web.Controllers
else else
{ {
client.Host = SmtpSendGridHost; client.Host = SmtpSendGridHost;
System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(SmtpSendGridUsername,SmtpSendGridPassword); System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(SmtpSendGridUsername, SmtpSendGridPassword);
client.Credentials = credentials; client.Credentials = credentials;
} }
// client.Port = Port; // client.Port = Port;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment