Exemple #1
0
    private ArrayList GetSelectedSuppliersFromGv()
    {
        ArrayList suppliersList = new ArrayList();

        foreach (GridViewRow gr in gvSuppliers.Rows)
        {
            // TODO: Check if checkbox is checked, if yes, add supplier in the sendlist
            CheckBox chkRow = (CheckBox)gr.FindControl("chkRow");

            if (chkRow.Checked)
            {
                BidParticipant participant = new BidParticipant();
                int            i           = gr.DataItemIndex;

                participant.ID           = int.Parse(((HiddenField)gvSuppliers.Rows[i].Cells[0].FindControl("hdnvendorid")).Value.ToString());
                participant.Name         = ((HiddenField)gvSuppliers.Rows[i].Cells[0].FindControl("hdnname")).Value.ToString();
                participant.Username     = ((HiddenField)gvSuppliers.Rows[i].Cells[0].FindControl("hdnusername")).Value.ToString();
                participant.EmailAddress = ((HiddenField)gvSuppliers.Rows[i].Cells[0].FindControl("hdnemail")).Value.ToString();
                participant.MobileNo     = ((HiddenField)gvSuppliers.Rows[i].Cells[0].FindControl("hdnmobileno")).Value.ToString();

                suppliersList.Add(participant);
            }
        }

        return(suppliersList);
    }
Exemple #2
0
    private ArrayList GetSelectedSuppliers()
    {
        ArrayList suppliersList = new ArrayList();

        SqlParameter[] sqlParams = new SqlParameter[1];
        sqlParams[0]       = new SqlParameter("@BidRefNo", SqlDbType.Int);
        sqlParams[0].Value = Int32.Parse(Session["BidRefNo"].ToString());
        DataTable dt = new DataTable();

        dt = SqlHelper.ExecuteDataset(connstring, CommandType.StoredProcedure, "sp_GetEmailAddresses", sqlParams).Tables[0];

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            BidParticipant participant = new BidParticipant();
            participant.ID           = int.Parse(dt.Rows[i]["VendorId"].ToString().Trim());
            participant.Name         = dt.Rows[i]["VendorName"].ToString().Trim();
            participant.Username     = dt.Rows[i]["UserName"].ToString().Trim();
            participant.EmailAddress = dt.Rows[i]["VendorEmail"].ToString().Trim();
            participant.MobileNo     = dt.Rows[i]["MobileNo"].ToString().Trim();

            suppliersList.Add(participant);
        }

        return(suppliersList);
    }
Exemple #3
0
    private string CreateInvitationSmsBody(BidDetails biddetails, BidParticipant participant)
    {
        //return String.Format("The Deadline for the: ", biddetails.Description, biddetails.ID, biddetails.SubmissionDeadline.ToString("MM/dd/yyyy hh:mm:ss tt"));

        DetailsView dv = Biddetails_details1.FindControl("dvEventDetails") as DetailsView;
        Label       lblPreviousDeadline = dv.FindControl("lblDeadline") as Label;

        String textMessage = "‘Submission Deadline of Bid reference Number: " + biddetails.ID + " has been changed from " + Convert.ToDateTime(lblPreviousDeadline.Text).ToString("MMMM dd, yyyy, hh:mm tt") + " to " + biddetails.SubmissionDeadline.ToString("MMMM dd, yyyy, hh:mm tt") + ".’";

        return(textMessage);
    }
Exemple #4
0
    private string CreateNotificationBody(BidDetails biddetails, BidParticipant participant)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("<table style='width: 100%'><tr><td style='width: 1px'></td><td style='width: auto' colspan=''></td><td style='width: 1px'></td></tr>");
        sb.Append("<tr><td style='width: auto; height: 635px'></td>");
        sb.Append("<td style='width: 100%; height: auto; text-align: justify;'>");
        sb.Append("<br />");
        sb.Append("<br />");
        sb.Append(DateTime.Now.ToLongDateString());
        sb.Append("<br /><br /><br /><strong>");
        sb.Append(participant.Name);
        sb.Append("<br /></strong>");
        sb.Append("<br />");
        sb.Append("<table style='width: 745px'>");
        sb.Append("<tr>");
        sb.Append("<td style='width: 50px'>");
        sb.Append("Attention &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; :</td>");
        sb.Append("<td style='width: 225px'>");
        sb.Append("<strong>");
        sb.Append(participant.Username);
        sb.Append("</strong></td></tr>");
        sb.Append("<tr>");
        sb.Append("<td style='width: 26px'>");
        sb.Append("</td>");
        sb.Append("<td style='width: 225px'>");
        sb.Append("</td></tr>");
        sb.Append("<tr>");
        sb.Append("<td style='width: 26px'>");
        sb.Append("</td>");
        sb.Append("<td style='width: 225px'>");
        sb.Append("</td></tr>");
        sb.Append("</table>");
        sb.Append("<br />");
        sb.Append("Re: ");
        sb.Append("&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; ");
        sb.Append(String.Format("Changed Submission Deadline Notification : {0}", biddetails.Description));
        sb.Append("<br /><br />");
        sb.Append("Dear Sir/Madame:&nbsp;<br /><br />");
        sb.Append("We would like to inform you that the Submission Deadline &nbsp;for ");
        sb.Append(String.Format("{2} has been moved from {0:D} {0:T} to {1:D} {1:T}.<br />", _currentDeadline, _newDeadline, biddetails.Description));
        sb.Append("<br /><br /><br />");
        sb.Append("");
        sb.Append("Sincerely,");
        sb.Append("<br /><br />");
        sb.Append(Session[Constant.SESSION_USERFULLNAME].ToString());
        sb.Append("<br /><br /><br /><br /></td><td style='width: auto; height: auto'></td></tr><tr><td style='width: auto'></td><td style='width: auto'></td><td style='width: auto'></td></tr></table>");


        return(MailTemplate.IntegrateBodyIntoTemplate(sb.ToString()));
    }
Exemple #5
0
    private string CreateInvitationBody(BidDetails biddetails, BidParticipant participant)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("<tr><td align='left'><h5>" + DateTime.Now.ToLongDateString() + "</h5></td></tr>");
        sb.Append("<tr><td align='left'><h3>INVITATION TO BID</h3></td></tr>");
        sb.Append("<tr>");
        sb.Append("<td valign='top'>");
        sb.Append("<p>");
        sb.Append("<b>TO: &nbsp;&nbsp;<u>" + participant.Name + "</u></b>");
        sb.Append("<br /><br />");
        sb.Append("Good Day!");
        sb.Append("<br /><br />");
        sb.Append("We are glad to inform you that you have been invited to participate in an online bidding event which was initiated by Trans-Asia");
        sb.Append("</p>");

        sb.Append("<table style='font-size: 12px;width:100%;'>");
        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>1.</td>");
        sb.Append("<td style='font-weight:bold;'>Bid Description</td>");
        sb.Append("</tr>");
        sb.Append("<tr>");
        sb.Append("<td width='30px' colspan='2'></td>");
        sb.Append("<td>" + biddetails.Description + "</td>");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");

        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>2.</td>");
        sb.Append("<td style='font-weight:bold;'>Schedule of Bid</td>");
        sb.Append("</tr>");
        sb.Append("<tr>");
        sb.Append("<td width='30px' colspan='2'></td>");
        sb.Append("<td>");
        sb.Append("Submission Deadline : " + biddetails.SubmissionDeadline + "<br />");
        sb.Append("</td>");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");

        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>3.</td>");
        sb.Append("<td style='font-weight:bold;'>Payment Details</td>");
        sb.Append("</tr>");
        sb.Append("<tr>");
        sb.Append("<td width='30px' colspan='2'></td>");
        sb.Append("<td>");
        sb.Append("<ul>");
        sb.Append("<li>Payment Terms - indicate applicable terms.</li>");
        // Commented by Angel 10/22/2008 ::  requested by Sir Seth
        //sb.Append("<br />");
        //sb.Append("<li>Billing Details</li>");
        //sb.Append("<ul>");
        //sb.Append("<li>Contact Person: Rose Soteco T# 730 2413</li>");
        //sb.Append("<li>Contact Details: 2F GT Plaza Tower 1, Pioneer cor Madison Sts., Mandaluyong City</li>");
        //sb.Append("</ul>");
        sb.Append("</ul>");
        sb.Append("</td>");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");

        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>4.</td>");
        sb.Append("<td style='font-weight:bold;'>Bid Price Details</td>");
        sb.Append("</tr>");
        sb.Append("<tr>");
        sb.Append("<td width='30px' colspan='2'></td>");
        sb.Append("<td>The bid price submitted by the supplier shall be exclusive of VAT.</td>");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");

        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>5.</td>");
        sb.Append("<td style='font-weight:bold;'>Price Validity</td>");
        sb.Append("</tr>");
        sb.Append("<tr>");
        sb.Append("<td width='30px' colspan='2'></td>");
        sb.Append("<td>");
        sb.Append("The price quoted must be valid and firm for a period of 90 days.");
        sb.Append("No change in price quoted shall be allowed after bid submission unless negotiated by Trans-Asia");
        sb.Append("</td.");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");

        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>6.</td>");
        sb.Append("<td style='font-weight:bold;'>Price Confirmation</td>");
        sb.Append("</tr>");
        sb.Append("<tr>");
        sb.Append("<td width='30px' colspan='2'></td>");
        sb.Append("<td>");
        sb.Append("Responses to the Invitation to Bid/Tender shall be sent by the vendors using the e-Sourcing Portal.");
        sb.Append("Price schedules (details) and other attachments shall be in Acrobat Format(i.e. PDF),");;
        sb.Append("or in any password-protected file (e.g. MS Word, Excel)");
        sb.Append("</td>");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");

        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>7.</td>");
        sb.Append("<td style='font-weight:bold;'>Grounds for Invalidating Bids</td>");
        sb.Append("</tr>");
        sb.Append("<tr>");
        sb.Append("<td width='30px' colspan='2'></td>");
        sb.Append("<td>");
        sb.Append("A supplier's bid may be invalidated under any of the following circumstances:");
        sb.Append("<ul>");
        sb.Append("<li>Incomplete bid documents</li>");
        sb.Append("<li>Scanned Summary documents without bidder's signature</li>");
        sb.Append("</ul>");
        sb.Append("</td>");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");

        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>8.</td>");
        sb.Append("<td style='font-weight:bold;'>Awarding of Bid</td>");
        sb.Append("</tr>");
        sb.Append("<tr>");
        sb.Append("<td width='30px' colspan='2'></td>");
        sb.Append("<td>");
        sb.Append("The lowest/highest bidder is not necessarily the winning bidder. Trans-Asia shall not be bound to assign any reason for not accepting any bid or accepting it in part.");
        sb.Append("Bids are still subject to further ecaluation. Trans-Asia shall award the winning supplier through a Purchase Order.");
        sb.Append("</td>");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");

        sb.Append("<tr>");
        sb.Append("<td width='10px'></td>");
        sb.Append("<td style='font-weight:bold;width:20px;'>9.</td>");
        sb.Append("<td style='font-weight:bold;'>Penalties (depends on the items to be purchased)</td>");
        sb.Append("</tr>");
        sb.Append("<tr><td height='10px' colspan='3'></td></tr>");
        sb.Append("</table>");

        sb.Append("<p>");
        sb.Append("<br /><br />");
        sb.Append("######################################################################################<br />");
        sb.Append("&nbsp;Credentials:<br />");
        sb.Append("&nbsp;&nbsp;&nbsp;Username: "******"<br /><br />");
        sb.Append("&nbsp;Notes:<br />");
        sb.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Password is for login.<br />");
        sb.Append("&nbsp;&nbsp;&nbsp;Username is NOT CASE SENSITIVE.<br />");
        sb.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If you don't know or forgot your password, go to eBid login page and click forgot password.<br />");
        sb.Append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use the username provided. Click Send. Your password will be sent to this email address.<br />");
        sb.Append("######################################################################################<br />");
        sb.Append("<br /><br /><br />");
        sb.Append("Sincerely Yours,");
        sb.Append("<br /><br />");
        sb.Append(biddetails.Creator);
        sb.Append("<br /><br />");
        sb.Append("</p>");
        sb.Append("</td>");
        sb.Append("</tr>");

        return(MailTemplate.IntegrateBodyIntoTemplate(sb.ToString()));
    }
Exemple #6
0
 private string CreateInvitationSmsBody(BidDetails biddetails, BidParticipant participant)
 {
     return(String.Format("You are invited to participate in a bid event;Ref. No.:{0}, initiated by Trans-Asia . Deadline: {1}", biddetails.ID, biddetails.SubmissionDeadline.ToString("MM/dd/yyyy hh:mm:ss tt")));
 }
Exemple #7
0
    private bool SendEmailInvitation(BidDetails biddetails, ArrayList recipients, ref int failedcount, ref int successcount)
    {
        bool   success = false;
        string subject = "Trans-Asia  Incorporated/ Commnunications : Invitation to Bid";

        failedcount  = 0;
        successcount = 0;

        try
        {
            for (int i = 0; i < recipients.Count; i++)
            {
                BidParticipant p = (BidParticipant)recipients[i];

                if (!MailHelper.SendEmail(MailTemplate.GetDefaultSMTPServer(),
                                          MailHelper.ChangeToFriendlyName(biddetails.Creator, biddetails.CreatorEmail),
                                          MailHelper.ChangeToFriendlyName(p.Name, p.EmailAddress),
                                          subject,
                                          CreateInvitationBody(biddetails, p),
                                          MailTemplate.GetTemplateLinkedResources(this)))
                {       // if sending failed
                    failedcount++;
                    LogHelper.EventLogHelper.Log("Bid Event > Send Invitation : Sending Failed to " + p.EmailAddress, System.Diagnostics.EventLogEntryType.Error);
                }
                else
                {       // if sending successful
                    successcount++;
                    LogHelper.EventLogHelper.Log("Bid Event > Send Invitation : Email Sent to " + p.EmailAddress, System.Diagnostics.EventLogEntryType.Information);

                    //add 1 to emailsent field based on vendorID and BidRefNo
                    SqlParameter[] sqlparams = new SqlParameter[2];
                    sqlparams[0]       = new SqlParameter("@Vendorid", SqlDbType.Int);
                    sqlparams[0].Value = p.ID;
                    sqlparams[1]       = new SqlParameter("@BidRefNo", SqlDbType.VarChar);
                    sqlparams[1].Value = Int32.Parse(Session["BidRefNo"].ToString());
                    SqlHelper.ExecuteNonQuery(connstring, CommandType.StoredProcedure, "sp_BidInvitationAddEmailSent", sqlparams);
                }
            }

            success = true;
        }
        catch (Exception ex)
        {
            success = false;
            LogHelper.EventLogHelper.Log("Bid Event > Send Invitation : " + ex.Message, System.Diagnostics.EventLogEntryType.Error);
        }

        try
        {
            for (int j = 0; j < recipients.Count; j++)
            {
                BidParticipant p = (BidParticipant)recipients[j];

                if (SMSHelper.AreValidMobileNumbers(p.MobileNo.Trim()))
                {
                    SMSHelper.SendSMS(new SMSMessage(CreateInvitationSmsBody(biddetails, p).Trim(), p.MobileNo.Trim())).ToString();
                }
            }
        }

        catch (Exception ex)
        {
            LogHelper.EventLogHelper.Log("Bid Event > Send SMS Invitation : " + ex.Message, System.Diagnostics.EventLogEntryType.Error);
        }

        return(success);
    }
Exemple #8
0
    protected void gvBidItemDetails_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "withdraw":
        {
            GridViewRow row            = ((Control)e.CommandSource).NamingContainer as GridViewRow;
            Panel       tmp_pnlcommand = (Panel)row.FindControl("pnlLinks");
            Panel       tmp_pnlcomment = (Panel)row.FindControl("pnlComments");

            tmp_pnlcommand.Visible = false;
            tmp_pnlcomment.Visible = true;
        } break;

        case "continuewithdraw":
        {
            if (BidItemTransaction.WithdrawBidItem(connstring, int.Parse(e.CommandArgument.ToString()), Constant.BIDITEM_STATUS.WITHDRAWAL_STATUS.WITHDRAWNED))
            {
                GridViewRow row            = ((Control)e.CommandSource).NamingContainer as GridViewRow;
                TextBox     tmp_txtComment = (TextBox)row.FindControl("txtComment");
                CheckBox    tmp_chkBox     = (CheckBox)row.FindControl("chkAlowVendorView");

                InsertWithdrawnedItemComments(int.Parse(e.CommandArgument.ToString()), tmp_txtComment.Text.ToString().Trim(), Session[Constant.SESSION_USERID].ToString(), tmp_chkBox.Checked);
                GetAllVendorsInfoByBidRef(int.Parse(e.CommandArgument.ToString()));
                SendEmailToVendors();

                #region Dev Richard - Send SMS Notification

                ArrayList recipients = GetSelectedSuppliers();

                GridViewRow lblItemRow = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
                Label       lblItem    = (Label)gvBidItemDetails.Rows[row.RowIndex].FindControl("lblItem");

                for (int a = 0; a < recipients.Count; a++)
                {
                    BidParticipant p        = (BidParticipant)recipients[a];
                    String         mobileNo = p.MobileNo;

                    if (SMSHelper.AreValidMobileNumbers(mobileNo.Trim()))
                    {
                        String textMessage = "“We wish to inform you that '" + lblItem.Text + "' has been withdrawn. Kindly go to your portal account under Withdrawn bid Items for details.”";

                        try
                        {
                            SMSHelper.SendSMS(new SMSMessage(textMessage, mobileNo));
                        }
                        catch
                        { }
                    }
                }

                #endregion

                Response.Redirect("withdrawnedbiditems.aspx");
            }
        } break;

        case "cancelwithdraw":
        {
            GridViewRow row            = ((Control)e.CommandSource).NamingContainer as GridViewRow;
            Panel       tmp_pnlcommand = (Panel)row.FindControl("pnlLinks");
            Panel       tmp_pnlcomment = (Panel)row.FindControl("pnlComments");
            TextBox     tmp_txtComment = (TextBox)row.FindControl("txtComment");

            tmp_pnlcommand.Visible = true;
            tmp_pnlcomment.Visible = false;
            tmp_txtComment.Text    = "";
        } break;
        }
    }
Exemple #9
0
    private bool SendEmail_ChangeDeadline(BidDetails biddetails, ArrayList recipients)
    {
        //String b_Company = ((Label)((DetailsView)Biddetails_details1.FindControl("dvEventDetails")).Rows[5].Cells[1].FindControl("lblCompany")).Text;

        bool   success      = false;
        string subject      = "Trans-Asia / Commnunications : Changed Submission Deadline Notification";
        int    failedcount  = 0;
        int    successcount = 0;

        try
        {
            #region NOTIFY VENDORS

            for (int i = 0; i < recipients.Count; i++)
            {
                BidParticipant p = (BidParticipant)recipients[i];

                if (!MailHelper.SendEmail(MailTemplate.GetDefaultSMTPServer(),
                                          MailHelper.ChangeToFriendlyName(Session[Constant.SESSION_USERFULLNAME].ToString(), Session[Constant.SESSION_USEREMAIL].ToString()),
                                          MailHelper.ChangeToFriendlyName(p.Name, p.EmailAddress),
                                          subject,
                                          CreateNotificationBody(biddetails, p),
                                          MailTemplate.GetTemplateLinkedResources(this)))
                {       // if sending failed
                    failedcount++;
                    LogHelper.EventLogHelper.Log("Bids > Send Notification : Sending Failed to " + p.EmailAddress, System.Diagnostics.EventLogEntryType.Error);
                }
                else
                {       // if sending successful
                    successcount++;
                    LogHelper.EventLogHelper.Log("Bids > Send Notification : Email Sent to " + p.EmailAddress, System.Diagnostics.EventLogEntryType.Information);

                    #region add 1 to emailsent field based on vendorID and BidRefNo

                    //SqlParameter[] sqlparams = new SqlParameter[2];
                    //sqlparams[0] = new SqlParameter("@Vendorid", SqlDbType.Int);
                    //sqlparams[0].Value = p.ID;
                    //sqlparams[1] = new SqlParameter("@BidRefNo", SqlDbType.VarChar);
                    //sqlparams[1].Value = Int32.Parse(Session["BidRefNo"].ToString());
                    //SqlHelper.ExecuteNonQuery(connstring, CommandType.StoredProcedure, "sp_BidInvitationAddEmailSent", sqlparams);
                    #endregion
                }
            }

            #region SMS SENDER
            try
            {
                for (int j = 0; j < recipients.Count; j++)
                {
                    BidParticipant BP = (BidParticipant)recipients[j];

                    if (SMSHelper.AreValidMobileNumbers(BP.MobileNo.Trim()))
                    {
                        SMSHelper.SendSMS(new SMSMessage(CreateInvitationSmsBody(biddetails, BP).Trim(), BP.MobileNo.Trim())).ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                LogHelper.EventLogHelper.Log("Bid Event > Send SMS Invitation : " + ex.Message, System.Diagnostics.EventLogEntryType.Error);
            }
            #endregion

            #endregion

            #region NOTIFY BUYER

            if (!MailHelper.SendEmail(MailTemplate.GetDefaultSMTPServer(),
                                      MailHelper.ChangeToFriendlyName(Session[Constant.SESSION_USERFULLNAME].ToString(), Session[Constant.SESSION_USEREMAIL].ToString()),
                                      MailHelper.ChangeToFriendlyName(biddetails.Creator, biddetails.CreatorEmail),
                                      subject,
                                      CreateNotificationBody(biddetails),
                                      MailTemplate.GetTemplateLinkedResources(this)))
            {
                failedcount++;
                LogHelper.EventLogHelper.Log("Bids > Send Notification : Sending Failed to " + Session[Constant.SESSION_USEREMAIL].ToString(), System.Diagnostics.EventLogEntryType.Error);
            }
            else
            {
                successcount++;
                LogHelper.EventLogHelper.Log("Bids > Send Notification : Email Sent to " + Session[Constant.SESSION_USEREMAIL].ToString(), System.Diagnostics.EventLogEntryType.Information);
            }

            #endregion

            success = true;
        }
        catch (Exception ex)
        {
            success = false;
            LogHelper.EventLogHelper.Log("Bid Item > Send ??? Change Notice : " + ex.Message, System.Diagnostics.EventLogEntryType.Error);
        }

        return(success);
    }