本文整理汇总了C#中Whitfieldcore.UpdateContengency方法的典型用法代码示例。如果您正苦于以下问题:C# Whitfieldcore.UpdateContengency方法的具体用法?C# Whitfieldcore.UpdateContengency怎么用?C# Whitfieldcore.UpdateContengency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Whitfieldcore
的用法示例。
在下文中一共展示了Whitfieldcore.UpdateContengency方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: grdContingency_ItemDataBound
public void grdContingency_ItemDataBound(object sender, DataGridItemEventArgs e)
{
Whitfieldcore _wc = new Whitfieldcore();
String DetailId = "";
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DetailId = grdContingency.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString();
((Label)(e.Item.FindControl("lblTotCost"))).Text = (Convert.ToDecimal(((Label)(e.Item.FindControl("lblqty"))).Text) * Convert.ToDecimal(((Label)(e.Item.FindControl("lblCost"))).Text.Trim())).ToString("00.00");
//Totalprice += Convert.ToDecimal(((Label)(e.Item.FindControl("lblCost"))).Text.Trim());
Grandprice += Convert.ToDecimal(((Label)(e.Item.FindControl("lblTotCost"))).Text.Trim());
}
else if (e.Item.ItemType == ListItemType.Footer)
{
txtTotCont.Text = Math.Floor(Grandprice).ToString();
_wc.UpdateContengency(ViewState["EstNum"].ToString(), Convert.ToInt32(Math.Floor(Grandprice).ToString().Trim()));
e.Item.Cells[2].Text = "Total:";
e.Item.Cells[2].ForeColor = System.Drawing.Color.Green;
e.Item.Cells[2].Font.Bold = true;
e.Item.Cells[2].HorizontalAlign = HorizontalAlign.Right;
//e.Item.Cells[3].Text = TotalPrice.ToString("00.00");
//e.Item.Cells[3].ForeColor = System.Drawing.Color.Green;
//e.Item.Cells[3].Font.Bold = true;
//e.Item.Cells[3].HorizontalAlign = HorizontalAlign.Right;
e.Item.Cells[5].Text = Grandprice.ToString("00.00");
e.Item.Cells[5].ForeColor = System.Drawing.Color.Green;
e.Item.Cells[5].Font.Bold = true;
e.Item.Cells[5].HorizontalAlign = HorizontalAlign.Right;
}
}
示例2: btncon_Click
protected void btncon_Click(object sender, EventArgs e)
{
Whitfieldcore _wc = new Whitfieldcore();
if (Page.IsValid)
{
_wc.UpdateContengency(ViewState["EstNum"].ToString(), Convert.ToInt32(txtTotCont.Text.Trim()));
}
Server.Transfer("whitfield_estimation.aspx?EstNum=" + ViewState["EstNum"].ToString());
}