protected void ButDevAdd_Click(object sender, DirectEventArgs e) { try { HidSaveFlag.Value = "1"; Button5.Hidden = false; Window4.Title = GetLangStr("TGSStationManager54", "添加连接设备"); CmbDevice.AllowBlank = false; CmbStationType.AllowBlank = false; CmbStationType.Reset(); TxtQStationName.Reset(); MulCmbAppFlag.Reset(); CmbDevice.Reset(); CmbStation.Reset(); NumChannel.Reset(); CmbIsSacn.Reset(); CmbDirection.Reset(); TxtImagePath.Reset(); TxtIpaddress.Reset(); NumPort.Reset(); CmbIsuse.Reset(); ButQuery.Hidden = false; CmbStationType.Hidden = false; TxtQStationName.Hidden = false; CmbDevice.Hidden = false; CmbStation.Hidden = false; CompositeField1.Hidden = false; Window4.Show(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("TGSStationManager.aspx-ButDevAdd_Click", ex.Message + ";" + ex.StackTrace, "ButDevAdd_Click has an exception"); } }
public void Modify() { try { Ext.Net.SelectedListItem ss; RowSelectionModel sm = this.GridDeviceManager.SelectionModel.Primary as RowSelectionModel; if (sm.SelectedRow != null) { string id = sm.SelectedRow.RecordID; HidSaveFlag.Value = "2"; Window4.Title = GetLangStr("TGSStationManager64", "修改连接设备信息"); CmbDevice.AllowBlank = true; CmbStationType.AllowBlank = true; HiddenId.Value = id; CmbStationType.Reset(); MulCmbAppFlag.Reset(); TxtQStationName.Reset(); CmbDevice.Reset(); CmbDirection.Reset(); CmbStation.Reset(); NumChannel.Reset(); CmbIsSacn.Reset(); TxtImagePath.Reset(); TxtIpaddress.Reset(); NumPort.Reset(); CmbIsuse.Reset(); ButQuery.Hidden = true; CmbStationType.Hidden = true; TxtQStationName.Hidden = true; CmbDevice.Hidden = true; CmbStation.Hidden = true; CompositeField1.Hidden = true; DataTable dt2 = deviceManager.GetTGSSetting("*", " id = '" + id + "'"); MulCmbAppFlag.SelectedItems.Clear(); if (dt2 != null) { if (dt2.Rows.Count > 0) { this.StoreDirection.DataSource = tgsPproperty.GetDirectionInfoByStation(dt2.Rows[0]["col2"].ToString()); this.StoreDirection.DataBind(); NumChannel.Text = dt2.Rows[0]["col8"].ToString(); CmbIsSacn.Value = dt2.Rows[0]["col10"].ToString(); TxtImagePath.Text = dt2.Rows[0]["col9"].ToString(); TxtIpaddress.Text = dt2.Rows[0]["col14"].ToString(); string port = dt2.Rows[0]["col13"].ToString(); if (!string.IsNullOrEmpty(port)) { NumPort.Text = dt2.Rows[0]["col13"].ToString(); } CmbIsuse.Value = dt2.Rows[0]["col15"].ToString(); CmbDirection.Value = dt2.Rows[0]["col16"].ToString(); string appflag = dt2.Rows[0]["col20"].ToString(); string[] appflags = appflag.Split(','); for (int i = 0; i < appflags.Length; i++) { Ext.Net.SelectedListItem si = new SelectedListItem(appflags[i]); ss = si; MulCmbAppFlag.SelectedItems.Add(si); } MulCmbAppFlag.Render(); } } DataRow[] dr = dtsbmc.Select("col0='" + id + "'"); sbtd = NumChannel.Text; DataRow[] drs = dtsfqy.Select("col0='" + dt2.Rows[0]["col10"].ToString() + "'"); //CmbIsSacn.SelectedItem.Text; sfwjsm = drs[0]["col1"].ToString(); DataRow[] dr2 = dttype.Select("col0='" + dt2.Rows[0]["col15"].ToString() + "'"); sfsy = dr2[0]["col1"].ToString(); tpbclj = TxtImagePath.Text; bdljip = TxtIpaddress.Text; bdljdk = NumPort.Text; ssfx = dt2.Rows[0]["col17"].ToString(); string sygzs = GetMultiCombo(MulCmbAppFlag.SelectedItems); if (sygzs.Contains(",")) { string[] sygz = sygzs.Split(','); for (int i = 0; i < sygz.Length; i++) { DataRow[] dt3 = dtsygz.Select("col0='" + sygz[i] + "'"); sytrgz = sytrgz + "[" + dt3[0]["col1"].ToString() + "]"; } } else { DataRow[] dt3 = dtsygz.Select("col0='" + sygzs + "'"); sytrgz = sytrgz + "[" + dt3[0]["col1"].ToString() + "]"; } //sytrgz = MulCmbAppFlag.Value.ToString(); Button5.Hidden = false; Window4.Show(); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("TGSStationManager.aspx-Modify", ex.Message + ";" + ex.StackTrace, "Modify has an exception"); } }