Commit 1f8c4a8bd22bb81b4a4bf679ca4af7e535568dea
1 parent
210b1552
cpmit changes
Showing
2 changed files
with
5 additions
and
4 deletions
400-SOURCECODE/AIAHTML5.API/Controllers/LabExerciseController.cs
... | ... | @@ -260,7 +260,7 @@ namespace AIAHTML5.API.Controllers |
260 | 260 | { |
261 | 261 | aar.Add(User["EmailAdd"].ToString()); |
262 | 262 | } |
263 | - AIAHTML5.API.Models.UserUtility.SendEmail(User, aar, User["EmailAdd"].ToString(), User["reportTitle"].ToString(), User["reportImage"].ToString()); | |
263 | + AIAHTML5.API.Models.UserUtility.SendEmail(User, aar, User["EmailAdd"].ToString(), User["reportTitle"].ToString(), User["reportImage"].ToString(), true); | |
264 | 264 | return Request.CreateResponse(HttpStatusCode.OK); |
265 | 265 | } |
266 | 266 | [Route("api/LabExercise/GetParameter")] | ... | ... |
400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs
... | ... | @@ -283,7 +283,7 @@ namespace AIAHTML5.API.Models |
283 | 283 | } |
284 | 284 | } |
285 | 285 | |
286 | - public static bool SendEmail(Newtonsoft.Json.Linq.JObject userInfo, ArrayList mailToList, string sender, string mailSubject = "", string mailBody = "") | |
286 | + public static bool SendEmail(Newtonsoft.Json.Linq.JObject userInfo, ArrayList mailToList, string sender, string mailSubject = "", string mailBody = "", bool isCalForLabExerciseReport=false) | |
287 | 287 | { |
288 | 288 | ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); |
289 | 289 | logger.Debug("Inside SendEmail with UserInfo =" + userInfo); |
... | ... | @@ -301,8 +301,9 @@ namespace AIAHTML5.API.Models |
301 | 301 | { |
302 | 302 | lstToAddress.Add(email); |
303 | 303 | } |
304 | - | |
305 | - //emailMessage = "Unable to process request for "; | |
304 | + if (!isCalForLabExerciseReport) | |
305 | + emailMessage = "Unable to process request for "; | |
306 | + else | |
306 | 307 | emailMessage = " "; |
307 | 308 | if (UserUtility.CheckIfPropertyExists(userInfo, "username") && !string.IsNullOrEmpty(userInfo["username"].ToString())) |
308 | 309 | emailMessage += "username: <b>" + userInfo["username"].ToString() + "</b>"; | ... | ... |