usesyrk_new.aspx.cs
来自「小区警务管理系统」· CS 代码 · 共 156 行
CS
156 行
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace web.SubDocument
{
public partial class usesyrk_new : web.Components.AdminBasePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
try
{
save.Attributes["onclick"] = "javascript:return checkme();";
InitData();
}
catch (Exception ex)
{
base.ErrorMsg(ex.ToString());
}
}
}
private void InitData()
{
SXSLNS.BLL.admin.dect bll = new SXSLNS.BLL.admin.dect();
DropDownList1.DataTextField = "name";
DropDownList1.DataValueField = "id";
DropDownList1.DataSource = bll.GetList("flag='11'");
DropDownList1.DataBind();
DropDownList2.DataTextField = "name";
DropDownList2.DataValueField = "id";
DropDownList2.DataSource = bll.GetList("flag='12'");
DropDownList2.DataBind();
DropDownList3.DataTextField = "name";
DropDownList3.DataValueField = "id";
DropDownList3.DataSource = bll.GetList("flag='20'");
DropDownList3.DataBind();
DropDownList4.DataTextField = "name";
DropDownList4.DataValueField = "id";
DropDownList4.DataSource = bll.GetList("flag='1'");
DropDownList4.DataBind();
DropDownList5.DataTextField = "name";
DropDownList5.DataValueField = "id";
DropDownList5.DataSource = bll.GetList("flag='13'");
DropDownList5.DataBind();
DropDownList6.DataTextField = "name";
DropDownList6.DataValueField = "id";
DropDownList6.DataSource = bll.GetList("flag='14'");
DropDownList6.DataBind();
DropDownList7.DataTextField = "name";
DropDownList7.DataValueField = "id";
DropDownList7.DataSource = bll.GetList("flag='16'");
DropDownList7.DataBind();
DropDownList8.DataTextField = "name";
DropDownList8.DataValueField = "id";
DropDownList8.DataSource = bll.GetList("flag='15'");
DropDownList8.DataBind();
DropDownList9.DataTextField = "name";
DropDownList9.DataValueField = "id";
DropDownList9.DataSource = bll.GetList("flag='17'");
DropDownList9.DataBind();
DropDownList10.DataTextField = "name";
DropDownList10.DataValueField = "id";
DropDownList10.DataSource = bll.GetList("flag='18'");
DropDownList10.DataBind();
DropDownList11.DataTextField = "name";
DropDownList11.DataValueField = "id";
DropDownList11.DataSource = bll.GetList("flag='19'");
DropDownList11.DataBind();
DropDownList12.DataTextField = "name";
DropDownList12.DataValueField = "id";
DropDownList12.DataSource = bll.GetList("flag='19'");
DropDownList12.DataBind();
DropDownList13.DataTextField = "name";
DropDownList13.DataValueField = "id";
DropDownList13.DataSource = bll.GetList("flag='19'");
DropDownList13.DataBind();
}
protected void save_Click(object sender, EventArgs e)
{
try
{
SXSLNS.BLL.admin.usesyrk bll = new SXSLNS.BLL.admin.usesyrk();
SXSLNS.Model.admin.usesyrk model = new SXSLNS.Model.admin.usesyrk();
model.xzz = TextBox1.Text.Trim();
model.hkszd = TextBox2.Text.Trim();
model.hklx = DropDownList1.SelectedValue;
model.hlx = DropDownList2.SelectedValue;
model.rylb = DropDownList3.SelectedValue;
model.hzgx = TextBox3.Text.Trim();
model.xm = TextBox4.Text.Trim();
model.xb = DropDownList4.SelectedItem.Text;
model.cym = TextBox5.Text.Trim();
model.mz = DropDownList5.SelectedValue;
model.csrq = TextBox6.Text.Trim();
model.sfzhm = TextBox7.Text.Trim();
model.whcd = DropDownList6.SelectedValue;
model.jg = TextBox8.Text.Trim();
model.fwcs = TextBox9.Text.Trim();
model.zy = TextBox10.Text.Trim();
model.sg = TextBox11.Text.Trim();
model.xx = DropDownList7.SelectedValue;
model.xh = TextBox12.Text.Trim();
model.hyzk = DropDownList8.SelectedValue;
model.byzk = DropDownList9.SelectedValue;
model.jdcph = TextBox13.Text.Trim();
model.czcph = TextBox14.Text.Trim();
model.zjxy = DropDownList10.SelectedValue;
model.fhzz = TextBox15.Text.Trim();
model.ywczf = DropDownList11.SelectedItem.Text;
model.ywzzrk = DropDownList12.SelectedItem.Text;
model.ywgfzz = DropDownList13.SelectedItem.Text;
model.lxdh = TextBox16.Text.Trim();
model.sj = TextBox17.Text.Trim();
model.xwxg = TextBox18.Text.Trim();
model.bz = TextBox19.Text.Trim();
bll.Add(model);
Response.Redirect("usesyrk.aspx", false);
}
catch (Exception ex)
{
base.ErrorMsg(ex.ToString());
}
}
protected void back_Click(object sender, EventArgs e)
{
Response.Redirect("usesyrk.aspx", false);
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?