Ejemplo n.º 1
0
    private void SendEmail()
    {
        MasterTablesManager   MasMgr  = new MasterTablesManager();
        MailManagerSmtpClient objMail = new MailManagerSmtpClient();

        DataTable dt = MasMgr.GetEmailNotification();

        string strRetText  = "";
        string strToAddr   = dt.Rows[0]["Disburse"].ToString().Trim();
        string strCC       = dt.Rows[0]["Notify"].ToString().Trim() + ";" + dt.Rows[0]["Verify"].ToString().Trim() + ";" + dt.Rows[0]["Review"].ToString().Trim();
        string strSubject  = "Salary of " + ddlMonth.SelectedItem.ToString().Trim() + " has been Approved";
        string strBody     = "Salary is approved, please proceed for payment.";
        string strFromAddr = Session["EMAILID"].ToString().Trim();

        strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, strCC);

        if (strRetText == "Y")
        {
            lblMsg.Text = lblMsg.Text + ", and Email has been sent to Disburse by Finance.";
        }
        else
        {
            lblMsg.Text = lblMsg.Text + ", Email sending failed.";
        }
    }
Ejemplo n.º 2
0
    private void SendEmail()
    {
        MasterTablesManager   MasMgr  = new MasterTablesManager();
        MailManagerSmtpClient objMail = new MailManagerSmtpClient();

        DataTable dt = MasMgr.GetEmailNotification();

        string strRetText  = "";
        string strToAddr   = dt.Rows[0]["Approval"].ToString().Trim();
        string strCC       = dt.Rows[0]["Notify"].ToString().Trim() + ";" + dt.Rows[0]["Verify"].ToString().Trim();
        string strSubject  = "Salary of " + ddlMonth.SelectedItem.ToString().Trim() + " has been waiting for your Approval";
        string strBody     = "Hi,<br />The salary has been reviwed and found ok, you may now approve.";
        string strFromAddr = Session["EMAILID"].ToString().Trim();

        strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, strCC);

        if (strRetText == "Y")
        {
            lblMsg.Text = lblMsg.Text + ", and Email has been sent to Approve by CR.";
        }
        else
        {
            lblMsg.Text = lblMsg.Text + ", Email sending failed.";
        }
    }
Ejemplo n.º 3
0
    private void SendEmail()
    {
        MasterTablesManager   MasMgr  = new MasterTablesManager();
        MailManagerSmtpClient objMail = new MailManagerSmtpClient();

        DataTable dt = MasMgr.GetEmailNotification();

        string strRetText  = "";
        string strToAddr   = dt.Rows[0]["Review"].ToString().Trim();
        string strCC       = dt.Rows[0]["Notify"].ToString().Trim();
        string strSubject  = "Salary of " + ddlMonth.SelectedItem.ToString().Trim() + " has been waiting for ur Recommendation";
        string strBody     = "Hi,<br />The salary has been verified by Finance and found ok, you may recommend for approval.";
        string strFromAddr = Session["EMAILID"].ToString().Trim();

        strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, strCC);

        if (strRetText == "Y")
        {
            lblMsg.Text = lblMsg.Text + ", and Email has been sent to Review by Director Finance.";
        }
        else
        {
            lblMsg.Text = lblMsg.Text + ", Email sending failed.";
        }
    }
Ejemplo n.º 4
0
    private void SendEmail()
    {
        MasterTablesManager   MasMgr  = new MasterTablesManager();
        MailManagerSmtpClient objMail = new MailManagerSmtpClient();

        DataTable dt = MasMgr.GetEmailNotification();

        string strRetText  = "";
        string strToAddr   = dt.Rows[0]["Notify"].ToString().Trim();
        string strCC       = dt.Rows[0]["Verify"].ToString().Trim() + ";" + dt.Rows[0]["Review"].ToString().Trim() + ";" + dt.Rows[0]["Approval"].ToString().Trim();
        string strSubject  = "Payroll has been Disbursed";
        string strBody     = "";
        string strFromAddr = Session["EMAILID"].ToString().Trim();

        strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, strCC);

        if (strRetText == "Y")
        {
            lblMsg.Text = lblMsg.Text + ", and Email has been sent to Notify previous Actors.";
        }
        else
        {
            lblMsg.Text = lblMsg.Text + ", Email sending failed.";
        }
    }
    private void GetEmailNotification()
    {
        DataTable dt = MasMgr.GetEmailNotification();

        if (dt.Rows.Count > 0)
        {
            txtHR.Text         = dt.Rows[0]["NEmpId"].ToString().Trim();
            txtApprover.Text   = dt.Rows[0]["AEmpId"].ToString().Trim();
            txtDirFinance.Text = dt.Rows[0]["REmpId"].ToString().Trim();
            txtDisburse.Text   = dt.Rows[0]["DEmpId"].ToString().Trim();
            txtFinance.Text    = dt.Rows[0]["VEmpId"].ToString().Trim();
        }
    }
Ejemplo n.º 6
0
    private void SendEmail()
    {
        MasterTablesManager   MasMgr  = new MasterTablesManager();
        MailManagerSmtpClient objMail = new MailManagerSmtpClient();

        DataTable dt = MasMgr.GetEmailNotification();

        string strRetText  = "";
        string strToAddr   = dt.Rows[0]["Verify"].ToString().Trim();
        string strSubject  = "Salary of " + ddlMonth.SelectedItem.ToString().Trim() + " has been waiting for your verification";
        string strBody     = "Hi,<br />The salary has been prepared by HR. Please verify and forword to Dir finance & Admin.";
        string strFromAddr = Session["EMAILID"].ToString().Trim();

        strRetText = objMail.PayslipEmail(strFromAddr, strToAddr, strSubject, strBody, "");

        if (strRetText == "Y")
        {
            lblMsg.Text = lblMsg.Text + "Email has been sent to Verify by Finance.";
        }
        else
        {
            lblMsg.Text = lblMsg.Text + "Email sending failed.";
        }
    }