温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:固定资产管理系统源码
当前文件路径:DepreciationManage/AssetsManage/ReturnForm.aspx.cs

1//文件名:ReturnForm.aspx.cs 2
using System; 3
using System.Data; 4
using System.Configuration; 5
using System.Collections; 6
using System.Web; 7
using System.Web.Security; 8
using System.Web.UI; 9
using System.Web.UI.WebControls; 10
using System.Web.UI.WebControls.WebParts; 11
using System.Web.UI.HtmlControls; 12
13
public partial class AssetsManage_ReturnForm : System.Web.UI.Page 14
{ 15
protected void Page_Load(object sender, EventArgs e) 16
{ 17
string MyForbidString = Session["MyForbid"].ToString(); 18
if (MyForbidString.IndexOf("A4") > 1) 19
{ 20
Server.Transfer("~/SystemManage/AllErrorHelp.aspx"); 21
} 22
string MyInfo = "一旦新增固定资产租借记录,就不能再进行修改!是否确定新增操作?"; 23
this.Button2.OnClientClick = "return confirm('" + MyInfo + "')"; 24
} 25
protected void Button2_Click(object sender, EventArgs e) 26
{//新增固定资产租借记录信息 27
this.SqlDataSource2.Insert(); 28
this.SqlDataSource1.Delete(); 29
this.TextBox2.Text = ""; 30
this.TextBox3.Text = ""; 31
} 32
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) 33
{//在文本框中显示选择的借出的固定资产信息 34
this.TextBox12.Text = this.GridView1.SelectedRow.Cells[1].Text.ToString(); 35
this.TextBox2.Text = this.GridView1.SelectedRow.Cells[2].Text.ToString(); 36
this.TextBox3.Text = this.GridView1.SelectedRow.Cells[3].Text.ToString(); 37
this.TextBox4.Text = this.GridView1.SelectedRow.Cells[4].Text.ToString(); 38
this.TextBox5.Text = this.GridView1.SelectedRow.Cells[5].Text.ToString(); 39
this.TextBox6.Text = this.GridView1.SelectedRow.Cells[6].Text.ToString(); 40
this.TextBox7.Text = this.GridView1.SelectedRow.Cells[7].Text.ToString(); 41
this.TextBox8.Text = this.GridView1.SelectedRow.Cells[8].Text.ToString(); 42
this.TextBox9.Text = this.GridView1.SelectedRow.Cells[9].Text.ToString(); 43
this.TextBox10.Text = this.GridView1.SelectedRow.Cells[10].Text.ToString(); 44
this.TextBox11.Text = this.GridView1.SelectedRow.Cells[11].Text.ToString(); 45
} 46
} 47





}
}