本文整理汇总了C#中Whitfieldcore.GetRightDistributionList方法的典型用法代码示例。如果您正苦于以下问题:C# Whitfieldcore.GetRightDistributionList方法的具体用法?C# Whitfieldcore.GetRightDistributionList怎么用?C# Whitfieldcore.GetRightDistributionList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Whitfieldcore
的用法示例。
在下文中一共展示了Whitfieldcore.GetRightDistributionList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisplayListBoxValues
public void DisplayListBoxValues()
{
try
{
try
{
Whitfieldcore wCore = new Whitfieldcore();
DataSet dsRight = new DataSet();
DataSet dsLeft = new DataSet();
dsLeft = wCore.GetLeftDistributionList(Convert.ToInt32(ViewState["EstNum"].ToString()), Convert.ToInt32(ViewState["twcProjNumber"].ToString()));
BindUsers(leftlist, dsLeft);
dsRight = wCore.GetRightDistributionList(Convert.ToInt32(ViewState["twcProjNumber"].ToString()));
BindUsers(rightlist, dsRight);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
示例2: sendEmail
public void sendEmail()
{
Whitfieldcore wCore = new Whitfieldcore();
whitfield_reports _wRep = new whitfield_reports();
MailMessage message = new MailMessage();
message.To.Add(System.Configuration.ConfigurationManager.AppSettings["devEmail"]);
//Here is where we add the receipients.
using (DataSet ds = wCore.GetRightDistributionList(Convert.ToInt32(ViewState["twc_project_number"].ToString())) ) //HHS Uncomment this portion when there is an email list.
{
DataTable dtUsr = ds.Tables[0];
if (dtUsr.Rows.Count > 0)
{
foreach (DataRow dRow in dtUsr.Rows)
{
string _email = dRow["Email"] == DBNull.Value ? "" : dRow["Email"].ToString();
message.To.Add(_email);
}
}
}
message.To.Add(System.Configuration.ConfigurationManager.AppSettings["AdminEmail"].ToString());
//This is commented by Harish on Friday, January 27th with the request of Jammie.
//message.To.Add(System.Configuration.ConfigurationManager.AppSettings["PMEmail"].ToString());
message.From = new MailAddress(System.Configuration.ConfigurationManager.AppSettings["DFR_fromEmail"]);
message.Subject = txtReportDate.Text.Trim() + " Daily Field Report:" + lblPrjHeader.Text.Trim();
message.IsBodyHtml = true;
StringBuilder sb = new StringBuilder();
sb.Append("<html><head></head>");
sb.Append("<body>");
//Header
sb.Append("<TABLE cellSpacing='0' cellPadding='0' width='100%' border='0'><TR>");
sb.Append("<TD><IMG height='80' alt='' src='http://www.whitfield-co.com/whitfield-co/assets/img/TWC%20Primary%20Logo1.JPG' border='0'></TD>");
sb.Append("<TD class='form1' vAlign='bottom' align='right' width='100%'><b>The Whitfield Corporation, Inc.,<br>");
sb.Append("P.O. Box 0385<br>");
sb.Append("Fulton, MD 20759<br>");
sb.Append("(301)-483-0791<br>");
sb.Append("(301)-483-0792</b><br>");
sb.Append("<IMG height='9' alt='' src='http://www.whitfield-co.com/whitfield-co/assets/img/images.gif' width='1'>");
sb.Append("</TD>");
sb.Append("</TR></TABLE>");
//EmployeeHours
System.Drawing.ColorConverter colConvert = new ColorConverter();
DataGrid dgWorkOrders = new DataGrid();
dgWorkOrders.Font.Size = 9;
dgWorkOrders.CssClass = "data";
dgWorkOrders.HeaderStyle.BackColor = (System.Drawing.Color)colConvert.ConvertFromString("#60829F");
dgWorkOrders.HeaderStyle.CssClass = "subnav";
dgWorkOrders.HeaderStyle.Font.Bold = true;
dgWorkOrders.ItemStyle.BackColor = (System.Drawing.Color)colConvert.ConvertFromString("#EAEFF3");
dgWorkOrders.FooterStyle.BackColor = (System.Drawing.Color)colConvert.ConvertFromString("#D9D9D9");
dgWorkOrders.DataSource = _wRep.GetReportActivityForProjectMail(_wRep.GetReportNumber(Convert.ToInt32(ViewState["twc_project_number"].ToString()), txtReportDate.Text.Trim()), Convert.ToInt32(ViewState["twc_project_number"].ToString()));
dgWorkOrders.DataBind();
StringBuilder SBEmployeeHours = new StringBuilder();
StringWriter SWEmployeeHours = new StringWriter(SBEmployeeHours);
HtmlTextWriter htmlTWEmployeeHours = new HtmlTextWriter(SWEmployeeHours);
dgWorkOrders.RenderControl(htmlTWEmployeeHours);
string EmployeeHoursString = SBEmployeeHours.ToString();
sb.Append("<br><B>Work Executed for Today:</b><br>" + EmployeeHoursString);
//Daily Work Performed Notes/Comments
String StrRptNotes = "";
if (txtRptNotes.Text == "")
{
StrRptNotes = "None.";
}
else
{
StrRptNotes = txtRptNotes.Text.Trim();
}
sb.Append("<TABLE cellSpacing='0' cellPadding='0' width='100%' border='0'><TR>");
sb.Append("<TD>");
sb.Append("<br><b>Daily Work Performed Notes/Comments:</b>" + StrRptNotes + "<br>");
sb.Append("</TD>");
sb.Append("</TR></TABLE>");
//Significant Issues/Impediments Notes/Comments:
String StrRptIssues = "";
if (txtRptIssues.Text == "")
{
StrRptIssues = "None.";
}
else
{
StrRptIssues = txtRptIssues.Text.Trim();
}
sb.Append("<TABLE cellSpacing='0' cellPadding='0' width='100%' border='0'><TR>");
sb.Append("<TD>");
sb.Append("<br><b>Significant Issues/Impediments Notes/Comments:</b>" + StrRptIssues + "<br>");
sb.Append("</TD>");
//.........这里部分代码省略.........