📄 insertroomtype.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;
using BLL;
using Model;
public partial class InsertRoomType : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
DIV1.Visible = false;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
RoomTypeEntity room = new RoomTypeEntity();
room.TypeName = this.TextBox1.Text;
room.TypePrice = this.TextBox2.Text;
room.AddBedPrice = this.TextBox3.Text;
string isadd = "";
if (RadioButton1.Checked)
{
isadd = "是";
}
if (RadioButton2.Checked)
{
isadd = "否";
}
room.IsAddBed = isadd;
room.Remark = this.TextBox4.Text;
RoomTypeBLL roombll = new RoomTypeBLL();
int count = roombll.insert(room);
if (count != 0)
{
DIV1.Visible = true;
this.Label1.Text = "插入成功!";
this.TextBox4.Text = "";
this.TextBox3.Text = "";
this.TextBox1.Text = "";
this.TextBox2.Text = "";
this.RadioButton1.Checked = false;
this.RadioButton2.Checked = false;
}
}
protected void Button2_Click(object sender, EventArgs e)
{
DIV1.Visible = false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -