本文整理汇总了C#中DataAccess.insertLocalPlan方法的典型用法代码示例。如果您正苦于以下问题:C# DataAccess.insertLocalPlan方法的具体用法?C# DataAccess.insertLocalPlan怎么用?C# DataAccess.insertLocalPlan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataAccess
的用法示例。
在下文中一共展示了DataAccess.insertLocalPlan方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnCreatePlan_Click
protected void btnCreatePlan_Click(object sender, EventArgs e)
{
if (cbLocked.Checked == true)
{
if (Convert.ToDecimal(txtAppropiation.Text) > 0)
{
DataAccess obj = new DataAccess();
String insRes = obj.insertLocalPlan(Convert.ToInt32(ddCollege.SelectedValue),
Convert.ToInt32(ddFiscalYear.SelectedValue),
Convert.ToDecimal(txtAppropiation.Text),
cbLocked.Checked,
HttpContext.Current.User.Identity.Name.ToString());
int ilp_id;
try
{
ilp_id = Convert.ToInt32(insRes);
if (ilp_id < 0)
{
if (insRes.Trim() == "-1")
{
lblMsg.Text = "Error: Narratives have not been Set, Local Plan not saved";
}
else
{
lblMsg.Text = insRes.ToString();
}
}
else
{
lblMsg.ForeColor = Color.Green;
lblMsg.Text = "Create Successful!";
txtAppropiation.Enabled = false;
cbLocked.Enabled = false;
btnSave.Visible = false;
btnCreatePlan.Visible = false;
lblLocalPlan.Text = insRes;
scs_local_plan_level lplObj = new scs_local_plan_level();
if (lplObj.LoadByPrimaryKey(ilp_id))
{
lblStatus.Text = lplObj.Txt_local_plan_level_status;
lblLevel.Text = lplObj.Txt_local_plan_level_status_desc;
}
}
}
catch
{
if (insRes.Trim() == "-1")
{
lblMsg.Text = "Error: Narratives have not been Set, Local Plan not saved";
}
else
{
lblMsg.Text = insRes.ToString();
}
}
}
else
{
lblMsg.ForeColor = Color.Red;
lblMsg.Text = "Invalid input, Yearly Appropiation has to be greater than 0 in order to lock local plan";
}
}
else
{
DataAccess obj = new DataAccess();
String insRes = obj.insertLocalPlan(Convert.ToInt32(ddCollege.SelectedValue),
Convert.ToInt32(ddFiscalYear.SelectedValue),
Convert.ToDecimal(txtAppropiation.Text),
cbLocked.Checked,
HttpContext.Current.User.Identity.Name.ToString());
int ilp_id;
try
{
ilp_id = Convert.ToInt32(insRes);
if (ilp_id < 0)
{
if (insRes.Trim() == "-1")
{
lblMsg.Text = "Error: Narratives have not been Set, Local Plan not saved";
}
else
{
lblMsg.Text = insRes.ToString();
}
}
else
{
lblMsg.ForeColor = Color.Green;
lblMsg.Text = "Create Successful!";
btnSave.Visible = true;
btnCreatePlan.Visible = false;
lblLocalPlan.Text = insRes;
scs_local_plan_level lplObj = new scs_local_plan_level();
//.........这里部分代码省略.........