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); }
protected void Page_Load(object sender, EventArgs e) { FormsAuthenticationHelper.AuthenticateUserWithReturnUrl(); if (Int32.Parse(Session[Constant.SESSION_USERTYPE].ToString().Trim()) != (int)Constant.USERTYPE.BUYER) { Response.Redirect("../unauthorizedaccess.aspx"); } PageTitle.InnerText = String.Format(Constant.TITLEFORMAT, "Bid Event Details"); connstring = Client.ConnectionString(HttpContext.Current.Session["clientid"].ToString()); Session[Constant.SESSION_COMMENT_TYPE] = "0"; if (Request.QueryString["brn"] != null) { Session[Constant.SESSION_BIDREFNO] = Request.QueryString["brn"].ToString(); } if (Session[Constant.SESSION_BIDREFNO] == null) { Response.Redirect("approvedbiditems.aspx"); } if (gvSuppliers.Rows.Count > 0) { CheckBox chkHeader = (CheckBox)gvSuppliers.HeaderRow.FindControl("chkHeader"); chkHeader.Attributes["onclick"] = "ChangeAllCheckBoxStates(this.checked);"; ClientScript.RegisterArrayDeclaration("CheckBoxIDs", String.Concat("'", chkHeader.ClientID, "'")); foreach (GridViewRow gr in gvSuppliers.Rows) { CheckBox chkRow = (CheckBox)gr.FindControl("chkRow"); chkRow.Attributes["onclick"] = "ChangeHeaderAsNeeded();"; ClientScript.RegisterArrayDeclaration("CheckBoxIDs", String.Concat("'", chkRow.ClientID, "'")); } } if (!Page.IsPostBack) { if (Session["Message"] != null) { lblMessage.Text = Session["Message"].ToString(); Session["Message"] = null; } if (DateTime.Now >= Convert.ToDateTime(((Label)((DetailsView)Biddetails_details1.FindControl("dvEventDetails")).Rows[12].Cells[1].FindControl("lblDeadline")).Text)) { btnSendEmailToVendors.Visible = false; gvSuppliers.Columns[0].Visible = false; } } }
private string CreateBodyWithdrawn( string vendorname, string vendorAddress, string vendorAddress1, string vendorAddress2, string vendorAddress3, string vendorcontactperson, string vendorphone, string vendorfax ) { String b_Event = ((Label)((DetailsView)Biddetails_details1.FindControl("dvEventDetails")).Rows[1].Cells[1].FindControl("lblItemDesc")).Text; String b_Item = ((Label)(gvBidItemDetails.Rows[0].Cells[0].FindControl("lblDescription"))).Text; StringBuilder sb = new StringBuilder(); #region WITHDRAWN EMAIL BODY sb.Append("<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 /><br /><br />"); sb.Append("" + DateTime.Now.ToLongDateString() + ""); sb.Append("<br /><br /><br /><strong>"); sb.Append(vendorname.Trim()); sb.Append("<br /></strong>"); sb.Append(vendorAddress.Trim()); sb.Append("<br />"); sb.Append(vendorAddress1.Trim()); sb.Append("<br />"); sb.Append(vendorAddress2.Trim()); sb.Append("<br />"); sb.Append(vendorAddress3.Trim()); sb.Append("<br /><br />"); sb.Append("<table style='width: 100%'><tr><td style='width: 1px; height: 8px'>Attention :</td><td style='width: 548px; height: 8px'><strong>"); sb.Append(vendorcontactperson.Trim()); sb.Append("</strong></td><td style='width: 1px; height: 8px'></td></tr><tr><td style='width: 1px'></td><td style='width: 548px'>"); sb.Append(vendorAddress.Trim()); sb.Append("</td><td style='width: 1px'></td></tr><tr><td style='width: 1px'></td><td style='width: 548px'>"); sb.Append(vendorAddress1.Trim()); sb.Append("</td><td style='width: 1px'></td></tr><tr><td style='width: 1px'></td><td style='width: 548px'>"); sb.Append(vendorAddress2.Trim()); sb.Append("</td><td style='width: 1px'></td></tr><tr><td style='width: 1px'></td><td style='width: 548px'>"); sb.Append(vendorAddress3.Trim()); sb.Append("</td><td style='width: 1px'></td></tr></table>"); sb.Append("<br /><br />"); sb.Append("<table style='width: 100%'><tr><td style='width: 12px'>"); sb.Append("Bid Event:"); sb.Append("</td><td style='width: auto'>"); sb.Append(b_Event); sb.Append("</td></tr><tr><td style='width: 12px'>"); sb.Append("Bid Item:"); sb.Append("</td><td style='width: auto'>"); sb.Append(b_Item); sb.Append("</td></tr></table>"); sb.Append("<br /><br />"); sb.Append("Dear Sir:"); sb.Append("<br /><br />"); sb.Append("Thank you for your interest to help Trans-Asia / Commnunications in finding a solution for "); sb.Append("" + b_Event + ". It certainly was a pleasure to "); sb.Append("have worked with your company during the RFP and the succeeding clarificatory discussions."); sb.Append("<br /><br />"); sb.Append("We regret to inform you that " + b_Item + " has been withdrawn. We will, however, keep in mind your cooperation "); sb.Append("and commitment when we have the opportunity to implement other projects. "); sb.Append("<br /><br />"); sb.Append("We sincerely appreciate the time and effort you dedicated for the completion of "); sb.Append("this RFP and we look forward to working with you again in the future."); sb.Append("<br /><br /><br />"); sb.Append("Sincerely,"); sb.Append("<br /><br /><br /><br />"); sb.Append(Session[Constant.SESSION_USERFULLNAME].ToString()); sb.Append("<br />"); sb.Append("Head, Corporate Procurement Department"); 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>"); #endregion return(MailTemplate.IntegrateBodyIntoTemplate(sb.ToString())); }