public string SaveTellerSessionToken(string TellerCode, string TellerName, DateTime date) { string res = ""; string User = HttpContext.Current.Session["Username"].ToString(); string DistrictCode = HttpContext.Current.Session["DistrictCode"].ToString(); DateTime now = DateTime.Now; int TellerID = int.Parse(TellerCode); if (bll.IsTokenIn(TellerID, date, DistrictCode)) { res = "There is already a token for " + TellerName + " in the system for " + date.ToString("dd-MM-yyyy"); } else { datafile.SaveTellerSession(TellerID, date, User, DistrictCode); string supervisor = HttpContext.Current.Session["FullName"].ToString(); string msg = "Hello " + TellerName + "\n Transaction Session has been granted to you for " + date.ToString("dd-MM-yyyy") + " by " + supervisor + "\n you can now transact"; string mail = NotifyCashier(TellerID, TellerName, msg); if (mail.Equals("SENT")) { res = "Transaction Session Created Successfully for " + TellerName; } else { res = "Transaction Session Created Successfully for " + TellerName + ", But Notification failed"; } } return(res); }