本文整理汇总了C#中DataAccess.updateFundedActivityLineItems方法的典型用法代码示例。如果您正苦于以下问题:C# DataAccess.updateFundedActivityLineItems方法的具体用法?C# DataAccess.updateFundedActivityLineItems怎么用?C# DataAccess.updateFundedActivityLineItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataAccess
的用法示例。
在下文中一共展示了DataAccess.updateFundedActivityLineItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Save
protected void Save()
{
lblMsg.Text = "";
hfPageInfo.Value = "0";
hfFlgSave.Value = "";
try
{
if (Request.QueryString.Get("id").Equals("-1"))
{
//Add new Activity
DataAccess obj = new DataAccess();
//Local Plan id will be enter later, use 101 for now
int iLpid;
iLpid = Convert.ToInt32(Session[Session.SessionID + "PlanID"].ToString());
String ika = obj.insertActivity(iLpid,
txtTypeEquip.Text,
txtSupProgram.Text,
101,
"",
Convert.ToInt32(DLB_Category.SelectedValue),
Convert.ToInt32(DLB_FunCode.SelectedValue),
102,
101);
lblAid.Text = ika;
//Insert Core Indicator
for (int i = 0; i < cblCoreIndicators.Items.Count; i++)
if (cblCoreIndicators.Items[i].Selected)
obj.insertFundedActivityCoreIndicator(Convert.ToInt32(ika),
Convert.ToInt32(cblCoreIndicators.Items[i].Value));
//update Line Item
for (int i = 0; i < TRG_Funds.MasterTableView.Items.Count; i++)
{
TextBox tb = (TextBox)TRG_Funds.MasterTableView.Items[i].FindControl("txt_Funds");
if (tb != null && !tb.Text.Equals(""))
{
obj.updateFundedActivityLineItems(Convert.ToInt32(ika),
Convert.ToInt32(TRG_Funds.MasterTableView.Items[i].GetDataKeyValue("key_line_item_type_id")),
Convert.ToDecimal(tb.Text));
}
}
InjectScript.Text = "<script>refreshPage(" + ika + ")</" + "script>";
}
else
{
//Update current activity
DataAccess obj = new DataAccess();
//Local Plan id will be enter later, use 101 for now
int ika = Convert.ToInt32(Request.QueryString.Get("id").ToString());
obj.updateActivity(ika,
101,
txtTypeEquip.Text,
txtSupProgram.Text,
0,
"",
Convert.ToInt32(DLB_Category.SelectedValue),
Convert.ToInt32(DLB_FunCode.SelectedValue),
102,
txtSystemOfficeNotes.Text,
Convert.ToInt32(ddStatus.SelectedValue),
cbLocked.Checked,
cbApproved.Checked,
false,
"",
101);
//Insert Core Indicator
for (int i = 0; i < cblCoreIndicators.Items.Count; i++)
if (cblCoreIndicators.Items[i].Selected)
obj.insertFundedActivityCoreIndicator(Convert.ToInt32(ika),
Convert.ToInt32(cblCoreIndicators.Items[i].Value));
//update Line Item
for (int i = 0; i < TRG_Funds.MasterTableView.Items.Count; i++)
{
TextBox tb = (TextBox)TRG_Funds.MasterTableView.Items[i].FindControl("txt_Funds");
if (tb != null && !tb.Text.Equals(""))
{
obj.updateFundedActivityLineItems(Convert.ToInt32(ika),
Convert.ToInt32(TRG_Funds.MasterTableView.Items[i].GetDataKeyValue("key_line_item_type_id")),
Convert.ToDecimal(tb.Text));
}
}
}
scs_error_dictionary errObj = new scs_error_dictionary();
if (errObj.LoadByPrimaryKey("200"))
{
lblMsg.Text = errObj.Txt_message;
}
TRG_Funds.DataBind();
RadGrid1.DataBind();
}
catch (Exception ex)
{
scs_error_dictionary errObj = new scs_error_dictionary();
//.........这里部分代码省略.........