public static GraphItems getReport() { AddSuggestion A = new AddSuggestion(); NewSuggestionModel NSM = new NewSuggestionModel(); Employee E = new Employee(); GraphItems gra = new GraphItems(); try { Mailling m = new Mailling(); DataSet Ds = new DataSet(); Ds = m.Barchart_get_details(); gra.Com = int.Parse(Ds.Tables[0].Rows[0].ItemArray[0].ToString()); gra.Hod = int.Parse(Ds.Tables[0].Rows[0].ItemArray[1].ToString()); gra.Imp = int.Parse(Ds.Tables[0].Rows[0].ItemArray[2].ToString()); gra.Hos = int.Parse(Ds.Tables[0].Rows[0].ItemArray[3].ToString()); gra.Ben = int.Parse(Ds.Tables[0].Rows[0].ItemArray[4].ToString()); gra.Fin = int.Parse(Ds.Tables[0].Rows[0].ItemArray[5].ToString()); return(gra); } catch (Exception ex) { return(gra); } }
public virtual MailLogDTO SendMail(Domain.Entity.Client currentClient, MailModel entity, object param) { List <string> recipients = new List <string>(); List <Document> documents = new List <Document>(); MailLog mailLog; ValidateNull(entity); if (!validation.PreValidatePost(validationDictionnary, currentClient, entity, param, repo, recipients, documents)) { throw new ManahostValidationException(validationDictionnary); } IHomeRepository homeRepo = ((MailController.AdditionalRepositories)param).HomeRepo; MailConfig mailconfig = repo.GetMailConfigById(entity.MailConfigId, currentClient.Id); Mailling.SendMailBcc(new InfosMailling(mailconfig.Smtp, (int)mailconfig.SmtpPort, mailconfig.Email, homeRepo.GetHomeById(mailconfig.HomeId, currentClient.Id).Title, Encoding.UTF8.GetString(Convert.FromBase64String(entity.Password))) { body = entity.Body, prio = System.Net.Mail.MailPriority.Normal, subject = entity.Subject, toPeople = recipients, ssl = (bool)mailconfig.IsSSL, attachments = MailUtils.GetAttachments(documents, mailconfig.Home) }, mailLog = new MailLog() { DateSended = DateTime.UtcNow, To = String.Join(",", recipients.ToArray()), Successful = true, HomeId = mailconfig.HomeId }); repo.Add <MailLog>(mailLog); return(GetMapper.Map <MailLog, MailLogDTO>(mailLog)); }
public void Barchart_details() { try { if (Session["UserId"] == null) { Response.Redirect("Main.aspx"); } else { Mailling m = new Mailling(); DataSet Ds = new DataSet(); Ds = m.Barchart_get_details(); com = int.Parse(Ds.Tables[0].Rows[0].ItemArray[0].ToString()); hod = int.Parse(Ds.Tables[0].Rows[0].ItemArray[1].ToString()); imp = int.Parse(Ds.Tables[0].Rows[0].ItemArray[2].ToString()); hos = int.Parse(Ds.Tables[0].Rows[0].ItemArray[3].ToString()); ben = int.Parse(Ds.Tables[0].Rows[0].ItemArray[4].ToString()); fin = int.Parse(Ds.Tables[0].Rows[0].ItemArray[5].ToString()); string script = "Barchart('" + com + "','" + hod + "','" + imp + "','" + hos + "','" + ben + "','" + fin + "'); "; ClientScript.RegisterStartupScript(this.GetType(), "function", script, true); } } catch (Exception e1) { } }
public static CESEmpEmailContents Checking(string IdeaID) { CommiteeEvalSend NM = new CommiteeEvalSend(); Mailling M = new Mailling(); Employee E = new Employee(); CESEmpEmailContents EEC = new CESEmpEmailContents(); string chk; RegistrationLogin RL = new RegistrationLogin(); //Console.Write(emp); //Console.Write("My first ASP script!"); try { try { if ((IdeaID != "") && (IdeaID != "System.Data.DataRowView")) { Console.Write(IdeaID); M.IdeaId = IdeaID.ToString().Trim(); DataSet DS = new DataSet(); DS = M.DBMReplyCE(M); chk = DS.Tables[0].Rows[0].ItemArray[0].ToString(); if (chk != "Empty") { EEC.RIdeaID = DS.Tables[0].Rows[0].ItemArray[0].ToString(); EEC.REmpID = DS.Tables[0].Rows[0].ItemArray[1].ToString(); EEC.RMail = DS.Tables[0].Rows[0].ItemArray[2].ToString(); EEC.RSub = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EEC.RCon = DS.Tables[0].Rows[0].ItemArray[4].ToString(); RL.HEmployeeID = EEC.REmpID; DS = RL.LoginSearch(RL); EEC.REmpName = DS.Tables[0].Rows[0].ItemArray[1].ToString(); } } else if (IdeaID == "") { EEC.ErrorLabel = "Check the Employee ID "; } else { EEC.ErrorLabel = "1"; } } catch (Exception ex) { EEC.ErrorLabel = "1"; } return(EEC); } catch (Exception ex) { throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message); } }
static public void sendTemplateMailLogError(String stacktrace, String message) { InfosMailling mail = new InfosMailling(); mail.toPeople.Add(MANAHOST_EMAIL); mail.subject = "Error Manahost"; mail.body = "An error occured : </br></br>message error : " + message + "</br></br>stacktrace error : " + stacktrace; mail.prio = MailPriority.High; Mailling.sendMail(mail, null); }
public static EmpEmailContents MailContent(string idea) { EmpEmailContents EECS = new EmpEmailContents(); Mailling M = new Mailling(); DataSet DS = new DataSet(); try { M.IdeaId = idea.ToString(); DS = M.Repeatersearch(M); EECS.fromTag = "From : "; EECS.EIDTag = "Employee ID : "; EECS.DepTag = "Department : "; EECS.DesTag = "Designaton : "; EECS.CatTag = "Category : "; EECS.IdIdTag = "Idea ID: "; EECS.BefTag = "Before : "; EECS.AftTag = "After : "; EECS.BenTag = "Benefits : "; EECS.upl1Tag = "FileUpload1"; EECS.upl2Tag = "FileUpload2"; EECS.upl3Tag = "FileUpload3"; EECS.IdeaIdTag = idea.ToString(); EECS.empname = DS.Tables[0].Rows[0].ItemArray[1].ToString(); EECS.empid = DS.Tables[0].Rows[0].ItemArray[0].ToString(); EECS.Department = DS.Tables[0].Rows[0].ItemArray[2].ToString(); EECS.Designation = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EECS.Date = DS.Tables[0].Rows[0].ItemArray[4].ToString(); EECS.category = DS.Tables[0].Rows[0].ItemArray[5].ToString(); EECS.subject = DS.Tables[0].Rows[0].ItemArray[6].ToString(); EECS.Before = DS.Tables[0].Rows[0].ItemArray[7].ToString(); EECS.After = DS.Tables[0].Rows[0].ItemArray[8].ToString(); EECS.Benifit = DS.Tables[0].Rows[0].ItemArray[9].ToString(); EECS.UpLoad1 = DS.Tables[0].Rows[0].ItemArray[11].ToString(); // EEC.upload1 = "/PIMS/UI/Image/" + EEC.UpLoad1; EECS.upload1 = "../UI/Image/" + EECS.UpLoad1; EECS.UpLoad2 = DS.Tables[0].Rows[0].ItemArray[12].ToString(); //EEC.upload2 = "/PIMS/UI/Image/" + EEC.UpLoad2; EECS.upload2 = "../UI/Image/" + EECS.UpLoad2; EECS.UpLoad3 = DS.Tables[0].Rows[0].ItemArray[13].ToString(); // EEC.upload3 = "/PIMS/UI/Image/" + EEC.UpLoad3; EECS.upload3 = "../UI/Image/" + EECS.UpLoad3; EECS.Description = DS.Tables[0].Rows[0].ItemArray[14].ToString(); return(EECS); } catch (Exception ex) { throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message); } }
public void SendOneMailServerWithoutPasswordShouldWork() { InfosMailling info = new InfosMailling(); info.toPeople.Add("*****@*****.**"); info.subject = "subject"; info.prio = MailPriority.High; info.ssl = false; info.modifyTimeOut(200000); MailLog log = new MailLog(); Mailling.sendMail(info, log); Assert.AreEqual(1, _Server.ReceivedEmailCount); }
static public void sendTemplateMailWarningConnection(String locale, String civility, String firstname, String lastname, String email) { InfosMailling mail = new InfosMailling(); String forgotPasswordLink = String.Format(FORGOT_LINK_FORMAT, email); ManahostManager.Utils.MailingUtils.Resources.MailTemplate.Culture = Thread.CurrentThread.CurrentCulture; mail.toPeople.Add(email); mail.subject = ManahostManager.Utils.MailingUtils.Resources.MailTemplate.SubjectConnectionWarning; mail.body = String.Format(ManahostManager.Utils.MailingUtils.Resources.MailTemplate.BodyConnectionWarning, civility, firstname, lastname, forgotPasswordLink); mail.body += ManahostManager.Utils.MailingUtils.Resources.MailTemplate.Footer; mail.prio = MailPriority.Normal; Mailling.sendMail(mail, null); }
static public void sendTemplateMailCreationAccount(String locale, String firstname, String lastName, String civility, String email, String tokenActivation) { InfosMailling mail = new InfosMailling(); String activationLink = String.Format(ACTIVATION_LINK_FORMAT, email, tokenActivation); String forgotPasswordLink = String.Format(FORGOT_LINK_FORMAT, email); mail.toPeople.Add(email); //Thread.CurrentThread.CurrentUICulture = new CultureInfo(locale); ManahostManager.Utils.MailingUtils.Resources.MailTemplate.Culture = Thread.CurrentThread.CurrentCulture; mail.subject = ManahostManager.Utils.MailingUtils.Resources.MailTemplate.SubjectAccountCreation; mail.body = String.Format(ManahostManager.Utils.MailingUtils.Resources.MailTemplate.BodyAccountCreation, civility, firstname, lastName, activationLink, email, forgotPasswordLink); mail.body += ManahostManager.Utils.MailingUtils.Resources.MailTemplate.Footer; mail.prio = MailPriority.Normal; Mailling.sendMail(mail, null); }
private void SendMail(InfosMailling mail, MailLog log, BookingStepBooking b, bool ssl, String body, List <Attachment> attachments) { mail.toPeople.Add(b.Booking.People.Email); mail.ssl = ssl; mail.prio = System.Net.Mail.MailPriority.High; mail.subject = b.CurrentStep.MailSubject; //TODO transform mail body template with the template generator mail.body = body; mail.attachments = attachments; Mailling.sendMail(mail, log); log.HomeId = b.HomeId; b.MailLog = log; if (b.MailLog.Successful) { b.MailSent++; } }
public static CEmpEmailContents MailContent(string idea) { CEmpEmailContents EECS = new CEmpEmailContents(); Mailling M = new Mailling(); DataBankManager DBM = new Models.DataBankManager(); DataSet DS = new DataSet(); try { //RepeaterItem item = (sender as TextBox).Parent as RepeaterItem; //index = int.Parse((item.FindControl("lblImageNameTextBox") as Label).Text); index = idea.ToString(); DBM.IdeaId = idea.ToString(); //Session["IdeaID"] = idea.ToString(); DS = DBM.ComtEvalRepViewUpatePannel(DBM); EECS.fromTag = "From : "; EECS.EIDTag = "Employee ID : "; EECS.DepTag = "Department : "; //EECS.DesTag = "Designaton : "; EECS.CatTag = "Category : "; EECS.IdIdTag = "Idea ID: "; EECS.BefTag = "Before : "; EECS.AftTag = "After : "; EECS.BenTag = "Benefits : "; EECS.upl1Tag = "FileUpload1"; EECS.upl2Tag = "FileUpload2"; EECS.upl3Tag = "FileUpload3"; EECS.SfromTag = "From : "; EECS.SEIDTag = "Employee ID : "; EECS.SDepTag = "Department : "; //EECS.DesTag = "Designaton : "; EECS.cmtid = idea.ToString(); EECS.IdeaIdTag = DS.Tables[0].Rows[0].ItemArray[8].ToString(); idea = DS.Tables[0].Rows[0].ItemArray[8].ToString(); EECS.Sempname = DS.Tables[0].Rows[0].ItemArray[2].ToString(); EECS.MailID = DS.Tables[0].Rows[0].ItemArray[5].ToString(); EECS.Sempid = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EECS.SDepartment = DS.Tables[0].Rows[0].ItemArray[4].ToString(); //EECS.Designation = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EECS.SDate = DS.Tables[0].Rows[0].ItemArray[1].ToString(); EECS.SSubject = DS.Tables[0].Rows[0].ItemArray[6].ToString(); EECS.SContent = DS.Tables[0].Rows[0].ItemArray[7].ToString(); EECS.empid = DS.Tables[0].Rows[0].ItemArray[9].ToString(); EECS.empname = DS.Tables[0].Rows[0].ItemArray[10].ToString(); EECS.Department = DS.Tables[0].Rows[0].ItemArray[11].ToString(); EECS.Designation = DS.Tables[0].Rows[0].ItemArray[12].ToString(); EECS.category = DS.Tables[0].Rows[0].ItemArray[13].ToString(); EECS.Benifit = DS.Tables[0].Rows[0].ItemArray[14].ToString(); EECS.Date = DS.Tables[0].Rows[0].ItemArray[15].ToString(); EECS.UpLoad1 = DS.Tables[0].Rows[0].ItemArray[24].ToString(); // EEC.upload1 = "/PIMS/UI/Image/" + EEC.UpLoad1; EECS.upload1 = "../UI/Image/" + EECS.UpLoad1; EECS.UpLoad2 = DS.Tables[0].Rows[0].ItemArray[25].ToString(); //EEC.upload2 = "/PIMS/UI/Image/" + EEC.UpLoad2; EECS.upload2 = "../UI/Image/" + EECS.UpLoad2; EECS.UpLoad3 = DS.Tables[0].Rows[0].ItemArray[26].ToString(); // EEC.upload3 = "/PIMS/UI/Image/" + EEC.UpLoad3; EECS.upload3 = "../UI/Image/" + EECS.UpLoad3; EECS.subject = DS.Tables[0].Rows[0].ItemArray[16].ToString(); EECS.Before = DS.Tables[0].Rows[0].ItemArray[17].ToString(); EECS.After = DS.Tables[0].Rows[0].ItemArray[18].ToString(); EECS.Reply = " Reply "; EECS.Status = DS.Tables[0].Rows[0].ItemArray[20].ToString(); EECS.SReason = DS.Tables[0].Rows[0].ItemArray[22].ToString(); EECS.SResponse = DS.Tables[0].Rows[0].ItemArray[21].ToString(); EECS.SenderID = DS.Tables[0].Rows[0].ItemArray[23].ToString(); return(EECS); } catch (Exception ex) { throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message); } //DataSet DS = new DataSet(); //DS = M.Repeatersearch(M); //fromTag.InnerHtml = "From : "; //EIDTag.InnerHtml = "Employee ID : "; //DepTag.InnerHtml = "Department : "; //DesTag.InnerHtml = "Designaton : "; //CatTag.InnerHtml = "Category : "; //BefTag.InnerHtml = "Before : "; //AftTag.InnerHtml = "After : "; //BenTag.InnerHtml = "Benefits : "; //EmployeeNameTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[1].ToString(); //EmployeeIDTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[0].ToString(); //DepartmentTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[2].ToString(); //DesignationTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[3].ToString(); //TimeTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[4].ToString(); //CategoryTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[5].ToString(); //SubjectTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[6].ToString(); //BeforeTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[7].ToString(); //AfterTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[8].ToString(); //BenefitsTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[9].ToString(); }
public static ADSEmpEmailContents MailContent(string idea) { ADSEmpEmailContents EECS = new ADSEmpEmailContents(); Mailling M = new Mailling(); DataSet DS = new DataSet(); try { //RepeaterItem item = (sender as TextBox).Parent as RepeaterItem; //index = int.Parse((item.FindControl("lblImageNameTextBox") as Label).Text); M.IdeaId = idea.ToString(); //Session["IdeaID"] = idea.ToString(); DS = M.DBMSenderRepeatersearch(M); EECS.fromTag = "From : "; EECS.EIDTag = "Employee ID : "; EECS.DepTag = "Department : "; //EECS.DesTag = "Designaton : "; EECS.CatTag = "Category : "; EECS.IdIdTag = "Idea ID: "; EECS.BefTag = "Before : "; EECS.AftTag = "After : "; EECS.BenTag = "Benefits : "; EECS.SfromTag = "From : "; EECS.SEIDTag = "Employee ID : "; EECS.SDepTag = "Department : "; //EECS.DesTag = "Designaton : "; EECS.IdeaIdTag = DS.Tables[0].Rows[0].ItemArray[8].ToString(); EECS.Sempname = DS.Tables[0].Rows[0].ItemArray[2].ToString(); EECS.MailID = DS.Tables[0].Rows[0].ItemArray[5].ToString(); EECS.Sempid = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EECS.SDepartment = DS.Tables[0].Rows[0].ItemArray[4].ToString(); //EECS.Designation = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EECS.SDate = DS.Tables[0].Rows[0].ItemArray[1].ToString(); EECS.SSubject = DS.Tables[0].Rows[0].ItemArray[6].ToString(); EECS.SContent = DS.Tables[0].Rows[0].ItemArray[7].ToString(); EECS.empid = DS.Tables[0].Rows[0].ItemArray[9].ToString(); EECS.empname = DS.Tables[0].Rows[0].ItemArray[10].ToString(); EECS.Department = DS.Tables[0].Rows[0].ItemArray[11].ToString(); EECS.Designation = DS.Tables[0].Rows[0].ItemArray[12].ToString(); EECS.category = DS.Tables[0].Rows[0].ItemArray[13].ToString(); EECS.Benifit = DS.Tables[0].Rows[0].ItemArray[14].ToString(); EECS.Date = DS.Tables[0].Rows[0].ItemArray[15].ToString(); EECS.subject = DS.Tables[0].Rows[0].ItemArray[16].ToString(); EECS.Before = DS.Tables[0].Rows[0].ItemArray[17].ToString(); EECS.After = DS.Tables[0].Rows[0].ItemArray[18].ToString(); return(EECS); } catch (Exception ex) { throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message); } //DataSet DS = new DataSet(); //DS = M.Repeatersearch(M); //fromTag.InnerHtml = "From : "; //EIDTag.InnerHtml = "Employee ID : "; //DepTag.InnerHtml = "Department : "; //DesTag.InnerHtml = "Designaton : "; //CatTag.InnerHtml = "Category : "; //BefTag.InnerHtml = "Before : "; //AftTag.InnerHtml = "After : "; //BenTag.InnerHtml = "Benefits : "; //EmployeeNameTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[1].ToString(); //EmployeeIDTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[0].ToString(); //DepartmentTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[2].ToString(); //DesignationTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[3].ToString(); //TimeTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[4].ToString(); //CategoryTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[5].ToString(); //SubjectTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[6].ToString(); //BeforeTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[7].ToString(); //AfterTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[8].ToString(); //BenefitsTag.InnerHtml = DS.Tables[0].Rows[0].ItemArray[9].ToString(); }
public static EmpEmailContent MailContent(string idea) { EmpEmailContent EEC = new EmpEmailContent(); Mailling M = new Mailling(); DataSet DS = new DataSet(); RegistrationLogin RL = new RegistrationLogin(); try { int i = 0; //RepeaterItem item = (sender as TextBox).Parent as RepeaterItem; //index = int.Parse((item.FindControl("lblImageNameTextBox") as Label).Text); M.IdeaId = idea.ToString(); DS = M.Repeatersearch(M); EEC.fromTag = "From : "; EEC.EIDTag = "Employee ID : "; EEC.DepTag = "Department : "; EEC.DesTag = "Designaton : "; EEC.CatTag = "Category : "; EEC.IdIdTag = "Idea ID: "; EEC.BefTag = "Before : "; EEC.AftTag = "After : "; EEC.BenTag = "Benefits : "; EEC.upl1Tag = "FileUpload1"; EEC.upl2Tag = "FileUpload2"; EEC.upl3Tag = "FileUpload3"; EEC.IdeaIdTag = idea.ToString(); EEC.empname = DS.Tables[0].Rows[0].ItemArray[1].ToString(); EEC.empid = DS.Tables[0].Rows[0].ItemArray[0].ToString(); EEC.Department = DS.Tables[0].Rows[0].ItemArray[2].ToString(); EEC.Designation = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EEC.Date = DS.Tables[0].Rows[0].ItemArray[4].ToString(); EEC.category = DS.Tables[0].Rows[0].ItemArray[5].ToString(); EEC.subject = DS.Tables[0].Rows[0].ItemArray[6].ToString(); EEC.Before = DS.Tables[0].Rows[0].ItemArray[7].ToString(); EEC.After = DS.Tables[0].Rows[0].ItemArray[8].ToString(); EEC.Benifit = DS.Tables[0].Rows[0].ItemArray[9].ToString(); EEC.UpLoad1 = DS.Tables[0].Rows[0].ItemArray[11].ToString(); // EEC.upload1 = "/PIMS/UI/Image/" + EEC.UpLoad1; EEC.upload1 = "../UI/Image/" + EEC.UpLoad1; EEC.UpLoad2 = DS.Tables[0].Rows[0].ItemArray[12].ToString(); //EEC.upload2 = "/PIMS/UI/Image/" + EEC.UpLoad2; EEC.upload2 = "../UI/Image/" + EEC.UpLoad2; EEC.UpLoad3 = DS.Tables[0].Rows[0].ItemArray[13].ToString(); // EEC.upload3 = "/PIMS/UI/Image/" + EEC.UpLoad3; EEC.upload3 = "../UI/Image/" + EEC.UpLoad3; DS = M.DBMReplyCE(M); chk = DS.Tables[0].Rows[0].ItemArray[0].ToString(); if (chk != "Empty") { EEC.RIdeaID = DS.Tables[0].Rows[0].ItemArray[0].ToString(); EEC.REmpID = DS.Tables[0].Rows[0].ItemArray[1].ToString(); EEC.RMail = DS.Tables[0].Rows[0].ItemArray[2].ToString(); EEC.RSub = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EEC.RCon = DS.Tables[0].Rows[0].ItemArray[4].ToString(); string[] breakMysentence = EEC.REmpID.Split(','); string[] ena1 = new string[breakMysentence.Length]; string n = ""; foreach (string data in breakMysentence) { ena1[i] = data; i = i + 1; RL.HEmployeeID = data.ToString().TrimStart().TrimEnd(); DS = RL.LoginSearch(RL); if (n != "") { n = n + ", " + DS.Tables[0].Rows[0].ItemArray[1].ToString(); } else { n = n + DS.Tables[0].Rows[0].ItemArray[1].ToString(); } } EEC.REmpName = n; } return(EEC); } catch (Exception ex) { throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message); } }
public static CEmpEmailContents getDetails(string idea) { CEmpEmailContents EECS = new CEmpEmailContents(); Mailling M = new Mailling(); DataBankManager DBM = new Models.DataBankManager(); Employee em = new Employee(); DataSet DS = new DataSet(); HOSModule hos = new HOSModule(); try { index = idea.ToString(); em.IdeaID = idea.ToString(); //Session["IdeaID"] = idea.ToString(); DS = hos.getEmailbySno(idea, "header"); EECS.fromTag = "From : "; EECS.EIDTag = "Employee ID : "; EECS.DepTag = "Department : "; //EECS.DesTag = "Designaton : "; EECS.CatTag = "Category : "; EECS.IdIdTag = "Idea ID: "; EECS.BefTag = "Before : "; EECS.AftTag = "After : "; EECS.BenTag = "Benefits : "; EECS.upl1Tag = "FileUpload1"; EECS.upl2Tag = "FileUpload2"; EECS.upl3Tag = "FileUpload3"; EECS.SfromTag = "From : "; EECS.SEIDTag = "Employee ID : "; EECS.SDepTag = "Department : "; //EECS.DesTag = "Designaton : "; EECS.cmtid = idea.ToString(); EECS.IdeaIdTag = DS.Tables[0].Rows[0].ItemArray[8].ToString(); idea = DS.Tables[0].Rows[0].ItemArray[8].ToString(); EECS.Sempname = DS.Tables[0].Rows[0].ItemArray[2].ToString(); EECS.MailID = DS.Tables[0].Rows[0].ItemArray[5].ToString(); EECS.Sempid = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EECS.SDepartment = DS.Tables[0].Rows[0].ItemArray[4].ToString(); //EECS.Designation = DS.Tables[0].Rows[0].ItemArray[3].ToString(); EECS.SDate = DS.Tables[0].Rows[0].ItemArray[1].ToString(); EECS.SSubject = DS.Tables[0].Rows[0].ItemArray[6].ToString(); EECS.SContent = DS.Tables[0].Rows[0].ItemArray[7].ToString(); EECS.empid = DS.Tables[0].Rows[0].ItemArray[9].ToString(); EECS.empname = DS.Tables[0].Rows[0].ItemArray[10].ToString(); EECS.Department = DS.Tables[0].Rows[0].ItemArray[11].ToString(); EECS.Designation = DS.Tables[0].Rows[0].ItemArray[12].ToString(); EECS.category = DS.Tables[0].Rows[0].ItemArray[13].ToString(); EECS.Benifit = DS.Tables[0].Rows[0].ItemArray[14].ToString(); EECS.Date = DS.Tables[0].Rows[0].ItemArray[15].ToString(); EECS.UpLoad1 = DS.Tables[0].Rows[0].ItemArray[24].ToString(); // EEC.upload1 = "/PIMS/UI/Image/" + EEC.UpLoad1; EECS.upload1 = "../UI/Image/" + EECS.UpLoad1; EECS.UpLoad2 = DS.Tables[0].Rows[0].ItemArray[25].ToString(); //EEC.upload2 = "/PIMS/UI/Image/" + EEC.UpLoad2; EECS.upload2 = "../UI/Image/" + EECS.UpLoad2; EECS.UpLoad3 = DS.Tables[0].Rows[0].ItemArray[26].ToString(); // EEC.upload3 = "/PIMS/UI/Image/" + EEC.UpLoad3; EECS.upload3 = "../UI/Image/" + EECS.UpLoad3; EECS.subject = DS.Tables[0].Rows[0].ItemArray[16].ToString(); EECS.Before = DS.Tables[0].Rows[0].ItemArray[17].ToString(); EECS.After = DS.Tables[0].Rows[0].ItemArray[18].ToString(); EECS.Reply = " Implementation Team Information "; EECS.Status = DS.Tables[0].Rows[0].ItemArray[20].ToString(); EECS.SReason = DS.Tables[0].Rows[0].ItemArray[22].ToString(); EECS.SResponse = DS.Tables[0].Rows[0].ItemArray[21].ToString(); EECS.SenderID = DS.Tables[0].Rows[0].ItemArray[23].ToString(); return(EECS); } catch (Exception ex) { throw new Exception("Error Initializing Data Class." + Environment.NewLine + ex.Message); } }