Exemple #1
0
    private void SendEmail(int _ProductID)
    {
        string mailMessage = string.Empty;

        try
        {
            using (BOC_Classifieds_Orders bocProductOrder = new BOC_Classifieds_Orders())
            {
                EOC_PropertyBean eocProduct = new EOC_PropertyBean();
                eocProduct.Classifieds_ProductProfile_ProductID = _ProductID;

                dtOrder = bocProductOrder.LoadList_Information_ClassifiedProducts(eocProduct);
                if (dtOrder.Rows.Count > 0)
                {
                    string strUrlContactSeller = Request.Url.ToString();
                    this.SendSeller_ConfirmationMail(dtOrder.Rows[0]["AdvertiserName"].ToString(), dtOrder.Rows[0]["LoginEmail"].ToString(), dtOrder, strUrlContactSeller);
                    this.SendBuyer_ConfirmationMail(txtName.Text, txtEmail.Text, dtOrder, strUrlContactSeller);
                }
                else
                {
                    lblSystemMessage.Text = "Mail can't send. Amount is not fully received.";
                }
            }
        }
        catch (Exception Exp)
        {
            Response.Write(Exp.Message.ToString());
        }
    }