?? complainform.aspx.cs
字號:
?//文件名:ComplainForm.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class CommunityManage_ComplainForm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string MyForbidString = Session["MyForbid"].ToString();
if (MyForbidString.IndexOf("B1") > 1)
{
Server.Transfer("~/SystemManage/AllErrorHelp.aspx");
}
}
protected void Button1_Click(object sender, EventArgs e)
{//新增服務投訴信息
this.SqlDataSource3.Insert();
}
protected void Button2_Click(object sender, EventArgs e)
{//修改服務投訴信息
this.SqlDataSource3.Update();
}
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{//彈出刪除操作確認對話框
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button MyButton = (Button)e.Row.FindControl("Button1");
MyButton.OnClientClick = "return confirm('是否確認刪除當前選擇的記錄?')";
}
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{//在控件中顯示選擇的記錄
this.TextBox2.Text = this.GridView1.SelectedRow.Cells[2].Text.ToString();
this.DropDownList1.SelectedValue = this.GridView1.SelectedRow.Cells[3].Text.ToString();
this.DropDownList2.SelectedValue= this.GridView1.SelectedRow.Cells[4].Text.ToString();
DateTime MyDate = DateTime.Parse(this.GridView1.SelectedRow.Cells[6].Text.ToString());
this.TextBox3.Text = MyDate.ToShortDateString();
this.TextBox4.Text = this.GridView1.SelectedRow.Cells[7].Text.ToString();
this.TextBox5.Text = this.GridView1.SelectedRow.Cells[8].Text.ToString();
this.TextBox6.Text = this.GridView1.SelectedRow.Cells[9].Text.ToString();
MyDate = DateTime.Parse(this.GridView1.SelectedRow.Cells[10].Text.ToString());
this.TextBox7.Text = MyDate.ToShortDateString();
this.TextBox8.Text = this.GridView1.SelectedRow.Cells[11].Text.ToString();
this.TextBox9.Text = this.GridView1.SelectedRow.Cells[12].Text.ToString();
this.TextBox10.Text = this.GridView1.SelectedRow.Cells[13].Text.ToString();
this.TextBox11.Text = this.GridView1.SelectedRow.Cells[14].Text.ToString();
this.TextBox12.Text = this.GridView1.SelectedRow.Cells[15].Text.ToString();
}
protected void Button4_Click(object sender, EventArgs e)
{//打印業(yè)主服務投訴處理單
this.Response.Redirect("~/CommunityManage/ComplainPrint.aspx?MyID=" + this.TextBox2.Text);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -