本文整理汇总了C#中Whitfieldcore.GetProjectInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Whitfieldcore.GetProjectInfo方法的具体用法?C# Whitfieldcore.GetProjectInfo怎么用?C# Whitfieldcore.GetProjectInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Whitfieldcore
的用法示例。
在下文中一共展示了Whitfieldcore.GetProjectInfo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindAwardedProjects
private void BindAwardedProjects()
{
DataSet dsGrp = new DataSet();
Whitfieldcore wProjects = new Whitfieldcore();
dsGrp = wProjects.GetProjectInfo("", "", "5");
if (dsGrp.Tables[0].Rows.Count > 0)
{
RdoAwdProjects.DataSource = dsGrp;
RdoAwdProjects.DataTextField = "ProjName";
RdoAwdProjects.DataValueField = "EstNum";
RdoAwdProjects.DataBind();
}
}
示例2: Summary_Queue
private DataSet Summary_Queue()
{
DataSet dsRpAdvances = new DataSet();
try
{
Whitfieldcore _wc = new Whitfieldcore();
if(Request.Cookies["RoleId"].Value == "2")
dsRpAdvances = _wc.GetProjectInfo(Request.Cookies["RoleId"].Value, Request.Cookies["UserId"].Value, txtEstName.Text.Trim(), ddlPrjStatus.SelectedItem.Value);
else
dsRpAdvances = _wc.GetProjectInfo(Request.Cookies["RoleId"].Value, ddlEstimator.SelectedItem.Value, txtEstName.Text.Trim(), ddlPrjStatus.SelectedItem.Value);
}
catch (Exception exp)
{
Response.Write(exp.Message.ToString());
}
return dsRpAdvances;
}
示例3: GeneratePDF
//public void GeneratePDF(DataSet _ms)
public void GeneratePDF(String EstNum, String IsFinancial)
{
Whitfieldcore _wc = new Whitfieldcore();
// MemoryStream m = new MemoryStream();
// Document document = new Document();
FileStream MyStream = null;
Document document = new Document(PageSize.A4, 50, 50, 50, 50);
try
{
iTextSharp.text.Font[] fonts = new iTextSharp.text.Font[16];
fonts[0] = FontFactory.GetFont(FontFactory.COURIER, 8, iTextSharp.text.Font.NORMAL);
fonts[1] = FontFactory.GetFont(FontFactory.COURIER, 8, iTextSharp.text.Font.BOLD);
fonts[2] = FontFactory.GetFont(FontFactory.COURIER, 8, iTextSharp.text.Font.ITALIC);
fonts[3] = FontFactory.GetFont(FontFactory.COURIER, 8, iTextSharp.text.Font.BOLD | iTextSharp.text.Font.ITALIC);
fonts[4] = FontFactory.GetFont(FontFactory.HELVETICA, 8, iTextSharp.text.Font.NORMAL);
fonts[5] = FontFactory.GetFont(FontFactory.HELVETICA, 8, iTextSharp.text.Font.BOLD);
fonts[6] = FontFactory.GetFont(FontFactory.HELVETICA, 8, iTextSharp.text.Font.ITALIC);
fonts[7] = FontFactory.GetFont(FontFactory.HELVETICA, 8, iTextSharp.text.Font.BOLD | iTextSharp.text.Font.ITALIC);
fonts[8] = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 10, iTextSharp.text.Font.NORMAL);
fonts[9] = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 10, iTextSharp.text.Font.BOLD);
fonts[10] = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 10, iTextSharp.text.Font.ITALIC);
fonts[11] = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 10, iTextSharp.text.Font.BOLD | iTextSharp.text.Font.ITALIC);
fonts[12] = FontFactory.GetFont(FontFactory.SYMBOL, 10, iTextSharp.text.Font.NORMAL);
fonts[13] = FontFactory.GetFont(FontFactory.ZAPFDINGBATS, 10, iTextSharp.text.Font.NORMAL);
fonts[14] = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 10, iTextSharp.text.Font.BOLD | iTextSharp.text.Font.UNDERLINE, iTextSharp.text.Color.GRAY);
fonts[15] = FontFactory.GetFont(FontFactory.TIMES_ROMAN, 10, iTextSharp.text.Font.NORMAL, iTextSharp.text.Color.GRAY);
// Response.ContentType = "application/pdf";
// Response.AddHeader("content-disposition", "attachment;filename=Proposal_Document.pdf");
//<Current Date> - <Project Name>, Architectural Millwork - WhitfieldCo
//String _filename = DateTime.Now.ToString("MM-dd-yyyy") + "-" + txtprjname + ", Architectural Millwork - WhitfieldCo.pdf"
//PdfWriter.GetInstance(document, new FileStream(_filename, FileMode.Create));
//PdfWriter writer = PdfWriter.GetInstance(document, m);
//writer.CloseStream = false;
IDataReader iReader = _wc.GetProjectInfo(Convert.ToInt32(EstNum));
while (iReader.Read())
{
txtprjname = iReader["ProjName"] == DBNull.Value ? "" : iReader["ProjName"].ToString();
lblPrjHeader = iReader["ProjName"] == DBNull.Value ? "" : iReader["ProjName"].ToString();
txtbasebid = iReader["BaseBid"] == DBNull.Value ? "" : iReader["BaseBid"].ToString();
txtfinalbid = iReader["FinalPrice"] == DBNull.Value ? "" : iReader["FinalPrice"].ToString();
txtdesc = iReader["ProjDescr"] == DBNull.Value ? "" : iReader["ProjDescr"].ToString();
txtNotes = iReader["Notes"] == DBNull.Value ? "" : iReader["Notes"].ToString();
txtBidDate = iReader["BidDate"] == DBNull.Value ? "" : iReader["BidDate"].ToString();
txtEditStartTime = iReader["BidTime"] == DBNull.Value ? "" : iReader["BidTime"].ToString();
txtARDt = iReader["AwardDur"] == DBNull.Value ? "" : iReader["AwardDur"].ToString();
txtawardDate = iReader["AwardDate"] == DBNull.Value ? "" : iReader["AwardDate"].ToString();
txtConstStdate = iReader["ConstrStart"] == DBNull.Value ? "" : iReader["ConstrStart"].ToString();
txtConstDuration = iReader["ConstrDur"] == DBNull.Value ? "" : iReader["ConstrDur"].ToString();
txtConstEndDate = iReader["ConstrCompl"] == DBNull.Value ? DateTime.Now.ToString() : iReader["ConstrCompl"].ToString();
//Adding New Fields
txtfabEndDate = iReader["fab_end"] == DBNull.Value ? "" : iReader["fab_end"].ToString();
txtfabStartdate = iReader["fab_start"] == DBNull.Value ? "" : iReader["fab_start"].ToString();
txtfabdurationt = iReader["fab_duration"] == DBNull.Value ? "" : iReader["fab_duration"].ToString();
txtStreet = iReader["prj_street"] == DBNull.Value ? "" : iReader["prj_street"].ToString();
txtCity = iReader["prj_city"] == DBNull.Value ? "" : iReader["prj_city"].ToString();
txtState = iReader["prj_state"] == DBNull.Value ? "" : iReader["prj_state"].ToString();
txtzip = iReader["prj_zip"] == DBNull.Value ? "" : iReader["prj_zip"].ToString();
//New Fields Ends
txtrealprjNumbert = iReader["Real_proj_Number"] == DBNull.Value ? "" : iReader["Real_proj_Number"].ToString();
prjArch = iReader["Architect"] == DBNull.Value ? "" : iReader["Architect"].ToString();
prjEsti = iReader["loginid"] == DBNull.Value ? "" : iReader["loginid"].ToString();
txtTotCotCost = iReader["Contengency"] == DBNull.Value ? "0" : iReader["Contengency"].ToString();
txtEngRate = iReader["enghourrate"] == DBNull.Value ? "45.00" : iReader["enghourrate"].ToString();
txtFabRate = iReader["fabhourrate"] == DBNull.Value ? "32.00" : iReader["fabhourrate"].ToString();
txtInstRate = iReader["insthourrate"] == DBNull.Value ? "45.00" : iReader["insthourrate"].ToString();
txtMiscRate = iReader["mischourrate"] == DBNull.Value ? "25.00" : iReader["mischourrate"].ToString();
txtOverHeadRate = iReader["overheadrate"] == DBNull.Value ? "24.11" : iReader["overheadrate"].ToString();
txtMarkUpPercent = iReader["profit_markup"] == DBNull.Value ? "15.00" : iReader["profit_markup"].ToString();
txtDrawingDate = iReader["drawingdate"] == DBNull.Value ? "" : iReader["drawingdate"].ToString();
txtTypeOfWork = iReader["typeofwork"] == DBNull.Value ? "" : iReader["typeofwork"].ToString();
}
Chunk chunkHeading;
if (txtprjname.Length >= 30)
{
chunkHeading = new Chunk(txtprjname + " ", fonts[15]);
}
else
{
chunkHeading = new Chunk(txtprjname + " ", fonts[15]);
}
String _modetype = IsFinancial == "Y" ? "Proposal" : "Scope";
Int32 _document_rev_number = GenerateseqNumberforDocs(Convert.ToInt32(EstNum), _modetype);
_filename = DateTime.Now.ToString("MM-dd-yyyy") + "-" + txtprjname.Replace("."," ").Trim() + " Architectural Millwork - WhitfieldCo " + _modetype + "-REV 0" + _document_rev_number + ".pdf";
//if (File.Exists(HttpContext.Current.Server.MapPath("~/attachments/") + _filename)) //If the file exists, create new one.
//{
// //File.Delete(HttpContext.Current.Server.MapPath("~/attachments/") + _filename);
// char[] splitchar = { '.' };
// string[] strArr = null;
// strArr = _filename.Split(splitchar);
// String _filenmTest = strArr[0];
// int intIndexSubstring = 0;
// intIndexSubstring = _filenmTest.IndexOf("-REV#");
//.........这里部分代码省略.........
示例4: FetchAndBind
public void FetchAndBind(Int32 _estNum)
{
if (Request.Cookies["RoleId"].Value == "1")
{
btnDelete.Visible = true;
}
pHprojClient.Visible = true;
pHprojcompe.Visible = true;
Whitfieldcore _wc = new Whitfieldcore();
bindcontrols(_estNum);
IDataReader iReader = _wc.GetProjectInfo(_estNum);
// ' Loop through the DataReader and write out each entry
while (iReader.Read())
{
//lstbidclient
//lstcompe
txtprjname.Text = iReader["ProjName"] == DBNull.Value ? "" : iReader["ProjName"].ToString();
lblPrjHeader.Text = iReader["ProjName"] == DBNull.Value ? "" : iReader["ProjName"].ToString();
txtbasebid.Text = iReader["BaseBid"] == DBNull.Value ? "" : iReader["BaseBid"].ToString();
txtfinalbid.Text = iReader["FinalPrice"] == DBNull.Value ? "" : iReader["FinalPrice"].ToString();
txtdesc.Text = iReader["ProjDescr"] == DBNull.Value ? "" : iReader["ProjDescr"].ToString();
txtNotes.Text = iReader["Notes"] == DBNull.Value ? "" : iReader["Notes"].ToString();
txtBidDate.Text = iReader["BidDate"] == DBNull.Value ? "" : iReader["BidDate"].ToString();
txtEditStartTime.Text = iReader["BidTime"] == DBNull.Value ? "" : iReader["BidTime"].ToString();
txtARD.Text = iReader["AwardDur"] == DBNull.Value ? "" : iReader["AwardDur"].ToString();
txtawardDate.Text = iReader["AwardDate"] == DBNull.Value ? "" : iReader["AwardDate"].ToString();
txtConstStdate.Text = iReader["ConstrStart"]== DBNull.Value ? "" : iReader["ConstrStart"].ToString();
txtConstDuration.Text = iReader["ConstrDur"] == DBNull.Value ? "" : iReader["ConstrDur"].ToString();
txtConstEndDate.Text = iReader["ConstrCompl"] == DBNull.Value ? "" : iReader["ConstrCompl"].ToString();
//Adding New Fields
txtfabEndDate.Text = iReader["fab_end"] == DBNull.Value ? "" : iReader["fab_end"].ToString();
txtfabStartdate.Text = iReader["fab_start"] == DBNull.Value ? "" : iReader["fab_start"].ToString();
txtfabduration.Text = iReader["fab_duration"] == DBNull.Value ? "" : iReader["fab_duration"].ToString();
txtStreet.Text = iReader["prj_street"] == DBNull.Value ? "" : iReader["prj_street"].ToString();
txtCity.Text = iReader["prj_city"] == DBNull.Value ? "" : iReader["prj_city"].ToString();
txtState.Text = iReader["prj_state"] == DBNull.Value ? "" : iReader["prj_state"].ToString();
txtzip.Text = iReader["prj_zip"] == DBNull.Value ? "" : iReader["prj_zip"].ToString();
//New Fields Ends
txtrealprjNumber.Text = iReader["Real_proj_Number"] == DBNull.Value ? "" : iReader["Real_proj_Number"].ToString();
String wincompe = iReader["WinMill"] == DBNull.Value ? "" : iReader["WinMill"].ToString();
String winclient = iReader["WinClient"] == DBNull.Value ? "" : iReader["WinClient"].ToString();
String prjstatus = iReader["Status"] == DBNull.Value ? "" : iReader["Status"].ToString();
String prjType = iReader["ProjType"] == DBNull.Value ? "" : iReader["ProjType"].ToString(); ;
String prjArch = iReader["Architect"] == DBNull.Value ? "" : iReader["Architect"].ToString();
String prjEsti = iReader["loginid"] == DBNull.Value ? "" : iReader["loginid"].ToString();
ddlwoncompe.SelectedIndex = ddlwoncompe.Items.IndexOf(ddlwoncompe.Items.FindByValue(wincompe.ToString()));
ddlwonclient.SelectedIndex = ddlwonclient.Items.IndexOf(ddlwonclient.Items.FindByValue(winclient.ToString()));
ddlPrjStatus.SelectedIndex = ddlPrjStatus.Items.IndexOf(ddlPrjStatus.Items.FindByValue(prjstatus.ToString()));
ddlprjtype.SelectedIndex = ddlprjtype.Items.IndexOf(ddlprjtype.Items.FindByValue(prjType.ToString()));
ddlarchitect.SelectedIndex = ddlarchitect.Items.IndexOf(ddlarchitect.Items.FindByValue(prjArch.ToString()));
ddlEstimator.SelectedIndex = ddlEstimator.Items.IndexOf(ddlEstimator.Items.FindByValue(prjEsti.ToString()));
if (ddlPrjStatus.SelectedItem.Value == "5")
{
txtrealprjNumber.ReadOnly = false;
}
//txtTotCont.Text = iReader["Contengency"] == DBNull.Value ? "0" : iReader["Contengency"].ToString();
txtTotCotCost.Text = iReader["Contengency"] == DBNull.Value ? "0" : iReader["Contengency"].ToString();
txtEngRate.Text = iReader["enghourrate"] == DBNull.Value ? "45.00" : iReader["enghourrate"].ToString();
txtFabRate.Text = iReader["fabhourrate"] == DBNull.Value ? "39.00" : iReader["fabhourrate"].ToString();
txtInstRate.Text = iReader["insthourrate"] == DBNull.Value ? "45.00" : iReader["insthourrate"].ToString();
txtMiscRate.Text = iReader["mischourrate"] == DBNull.Value ? "25.00" : iReader["mischourrate"].ToString();
txtOverHeadRate.Text = iReader["overheadrate"] == DBNull.Value ? "24.11" : iReader["overheadrate"].ToString();
txtMarkUpPercent.Text = iReader["profit_markup"] == DBNull.Value ? "15.00" : iReader["profit_markup"].ToString();
txtDrawingDt.Text = iReader["drawingdate"] == DBNull.Value ? "" : iReader["drawingdate"].ToString();
String TypeOfWork = iReader["typeofwork"] == DBNull.Value ? "" : iReader["typeofwork"].ToString();
ddlTypeofWork.SelectedIndex = ddlTypeofWork.Items.IndexOf(ddlTypeofWork.Items.FindByValue(TypeOfWork.ToString()));
}
//Populate Parameters
txtTotMatCost.Text = _wc.GetMaterialCost(_estNum).ToString();
txtMatContTotal.Text = (_wc.GetMaterialCost(_estNum) + Convert.ToInt32(txtTotCotCost.Text)).ToString();
DataSet dsNormal = _wc.GetBudgetHoursForEstimation(_estNum.ToString());
DataTable dtNormal = dsNormal.Tables[0];
foreach (DataRow dRow in dtNormal.Rows)
{
txtEngQty.Text = dRow["eng_hours"] == DBNull.Value ? "0" : dRow["eng_hours"].ToString();
txtEngTotal.Text = (Convert.ToInt32(txtEngQty.Text) * Convert.ToDecimal(txtEngRate.Text)).ToString();
String fabQty = dRow["fab_hours"] == DBNull.Value ? "0" : dRow["fab_hours"].ToString();
String finQty = dRow["fin_hours"] == DBNull.Value ? "0" : dRow["fin_hours"].ToString();
txtFabQty.Text = (Convert.ToInt32(fabQty) + Convert.ToInt32(finQty)).ToString();
txtFabTotal.Text = (Convert.ToInt32(txtFabQty.Text) * Convert.ToDecimal(txtFabRate.Text)).ToString();
txtInsQty.Text = dRow["install_hours"] == DBNull.Value ? "0" : dRow["install_hours"].ToString();
txtInsTotal.Text = (Convert.ToInt32(txtInsQty.Text) * Convert.ToDecimal(txtInstRate.Text)).ToString();
txtMiscQty.Text = dRow["misc_hours"] == DBNull.Value ? "0" : dRow["misc_hours"].ToString();
txtMiscTotal.Text = (Convert.ToInt32(txtMiscQty.Text) * Convert.ToDecimal(txtMiscRate.Text)).ToString();
// lblbudtot.Text = dRow["TotHours"] == DBNull.Value ? "0" : dRow["TotHours"].ToString();
}
if (txtEngQty.Text == "0" && txtFabQty.Text == "0" && txtInsQty.Text == "0" && txtMiscQty.Text == "0")
{
txtTotRate.Text = "0.00";
}
else
{
//.........这里部分代码省略.........
示例5: Summary_Queue
private DataSet Summary_Queue(String _statuscd)
{
DataSet dsRpAdvances = new DataSet();
try
{
Whitfieldcore _wc = new Whitfieldcore();
dsRpAdvances = _wc.GetProjectInfo(Request.Cookies["RoleId"].Value, Request.Cookies["UserId"].Value, _statuscd);
}
catch (Exception exp)
{
Response.Write(exp.Message.ToString());
}
return dsRpAdvances;
}