protected void AddBinGuan(object sender, EventArgs e) { BingGuanInfo _BingGuanInfo = new BingGuanInfo(); int DingFangXiTongSN = Convert.ToInt32(Texx_DingFangXiTong.Text); DingFangXiTongInfo _DingFangXiTongInfo = MyDingFangXiTong.Get(DingFangXiTongSN); _BingGuanInfo.B_SuoShuDingFangXiTongSN = _DingFangXiTongInfo.D_SN; _BingGuanInfo.B_SuoShuBuMenSN = _DingFangXiTongInfo.D_SuoShuBuMenSN; _BingGuanInfo.B_Name = Texx_BingGuanName.Text; _BingGuanInfo.B_AddDate = DateTime.Now; _BingGuanInfo.B_Address = Texx_Address.Text; _BingGuanInfo.B_Phone = Texx_Phone.Text; MyBingGuan.Add(_BingGuanInfo); RegisterClientScriptBlock("", "<script>alert('操作成功!'); window.location.href='AddBingGuan.aspx'</script>"); }
protected void AddBingGuan(object sender, EventArgs e) { BingGuanInfo _BingGuanInfo = new BingGuanInfo(); _BingGuanInfo.B_AddDate = DateTime.Now; _BingGuanInfo.B_Address = Texx_Address.Text; _BingGuanInfo.B_Name = Texx_Name.Text; _BingGuanInfo.B_Phone = Texx_Phone.Text; Int32 XiTongSN = Convert.ToInt32(Texx_DingFangXiTong.Text); DingFangXiTongInfo _DingFangXiTongInfo = MyDingFangXiTong.Get(XiTongSN); _BingGuanInfo.B_SuoShuDingFangXiTongSN = XiTongSN; _BingGuanInfo.B_SuoShuBuMenSN = _DingFangXiTongInfo.D_SuoShuBuMenSN; MyBingGuan.Add(_BingGuanInfo); RegisterClientScriptBlock("", "<script>alert('操作成功!'); </script>"); CleartextBoxes(this); }