private void BuildTree1(Ext.Net.NodeCollection nodes) { if (nodes == null) { nodes = new Ext.Net.NodeCollection(); } Ext.Net.Node root = new Ext.Net.Node(); root.Text = "处方模版"; root.Expanded = true; nodes.Add(root); string[] GroupName = new string[3] { "医嘱用药模板", "血管通路用药模板", "血管通路耗材组合" }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = Icon.Star, Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } TreePanel1.Render(); }
private void BuildTree1(Ext.Net.NodeCollection nodes) { if (nodes == null) { nodes = new Ext.Net.NodeCollection(); } Ext.Net.Node root = new Ext.Net.Node(); root.Text = "库存管理"; root.Expanded = true; nodes.Add(root); string[] GroupName = { "库存表", "每日病患材料单", "领料单", "退料单", "耗材使用统计", "进货明细" }; Icon[] icon_array = { Icon.Book, Icon.Report, Icon.Report, Icon.Report, Icon.Report, Icon.Report }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = icon_array[i], Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } TreePanel1.Render(); }
private void BuildTree1(Ext.Net.NodeCollection nodes) { if (nodes == null) { nodes = new Ext.Net.NodeCollection(); } Ext.Net.Node root = new Ext.Net.Node(); root.Text = "血透信息"; root.Expanded = true; nodes.Add(root); string[] GroupName = new string[7] { "血管通路", "透析处方", "血压测量", "透析充分性", "抗凝剂", "干体重", "合用其他透析模式" }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = Icon.Star, Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } TreePanel1.Render(); }
private void BuildTree1(Ext.Net.NodeCollection nodes) { if (nodes == null) { nodes = new Ext.Net.NodeCollection(); } Ext.Net.Node root = new Ext.Net.Node(); root.Text = "设备管理"; root.Expanded = true; nodes.Add(root); string[] GroupName = { "人员档案", "人员肝炎指标", "人员疫苗接种", "设备档案", "设备保养纪录", "透析中心信息" }; Icon[] icon_array = { Icon.User, Icon.User, Icon.User, Icon.Table, Icon.TableGear, Icon.TableGear }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = icon_array[i], Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } TreePanel1.Render(); }
private void BuildTree1(Ext.Net.NodeCollection nodes) { if (nodes == null) { nodes = new Ext.Net.NodeCollection(); } Ext.Net.Node root = new Ext.Net.Node(); root.Text = "排班选单"; root.Expanded = true; nodes.Add(root); string[] GroupName = { "本周排班", "双周预约排班", "双周预约排班打印", "固定排班", "排班查询" }; Icon[] icon_array = { Icon.User, Icon.User, Icon.Report, Icon.Table, Icon.User }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = icon_array[i], Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } TreePanel1.Render(); }
private void BuildTree1(Ext.Net.NodeCollection nodes) { if (nodes == null) { nodes = new Ext.Net.NodeCollection(); } Ext.Net.Node root = new Ext.Net.Node(); root.Text = "基本资料表"; root.Expanded = true; nodes.Add(root); if (Hospital == "Hospital_Alasamo") { string[] GroupName = { "基本资料", "病史", "体格检查", "实验室检查", "诊断", "打印", "用药纪录", "季度小结" }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = Icon.Star, Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } } else { string[] GroupName = { "基本资料", "病史", "体格检查", "实验室检查", "诊断", "打印", "用药纪录" }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = Icon.Star, Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } } TreePanel1.Render(); }
public void Delete(string id, string name) { int i = serviceManager.DeleteSevice(id); if (i > 0) { GridDataBind(GetWhere()); Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer59", "删除成功")); logManager.InsertLogRunning(uName, "删除:姓名[" + name + "]", nowIp, "3"); BuildTree(TreePanel1.Root); TreePanel1.Render(); } else { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer60", "删除失败")); } }
public void DoYes() { try { RowSelectionModel sm = this.GridDeviceManager.SelectionModel.Primary as RowSelectionModel; sm.SelectedRow.ToBuilder(); string Id = sm.SelectedRow.RecordID; DataTable dt = deviceManager.GetDeviceInfo("device_id='" + Id + "'"); if (dt != null) { if (dt.Rows.Count > 0) { sbmc = dt.Rows[0]["DEVICE_NAME"].ToString(); } } if (deviceManager.DeleteDevice(Id) > 0) { // value = Cob_SBLX.Value.ToString(); if (!string.IsNullOrEmpty(value)) { LedDataBind(" 1=1 and a.device_type_id='" + value + "'"); } else { LedDataBind(" 1=1"); } logManager.InsertLogRunning(uName, GetLangStr("DeviceManager13", "删除:[") + sbmc + GetLangStr("DeviceManager15", "]设备"), nowIp, "3"); Notice(GetLangStr("DeviceManager70", "信息提示"), GetLangStr("DeviceManager71", "删除成功")); //左边树重新加载 BuildTree(TreePanel1.Root); TreePanel1.Render(); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceManager.aspx-DoYes", ex.Message + ";" + ex.StackTrace, "DoYes has an exception"); } }
private void BuildTree1(Ext.Net.NodeCollection nodes) { if (nodes == null) { nodes = new Ext.Net.NodeCollection(); } Ext.Net.Node root = new Ext.Net.Node(); root.Text = "血液透析"; root.Expanded = true; nodes.Add(root); string[] GroupName = new string[] { "交班记录表", "血液净化记录", "净化过程明细", "血液净化记录表", "拟用药使用统计表", "血液透析患者评估表", "拟用药使用统计表" }; Icon[] icon_array = new Icon[] { Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = icon_array[i], Cls = "large-font", Leaf = true }; if (i <= 3) { root.Children.Add(groupNode); } if (Hospital == "Hospital_Suzhou" && (i == 4 || i == 5)) //蘇州醫院專用 { root.Children.Add(groupNode); } else if (Hospital == "Hospital_Xian" && i == 6) //武警醫院專用 { root.Children.Add(groupNode); } } TreePanel1.Render(); }
private void BuildTree1(Ext.Net.NodeCollection nodes) { if (nodes == null) { nodes = new Ext.Net.NodeCollection(); } Ext.Net.Node root = new Ext.Net.Node(); root.Text = "系統設置"; root.Expanded = true; nodes.Add(root); string[] GroupName = new string[] { "药品维护", "透析器型号", "血管通路维护", "管路类型", "管路型号", "权限设定维护", "病区/床号维护" }; Icon[] icon_array = new Icon[] { Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star }; for (int i = 0; i < GroupName.Length; i++) { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = GroupName[i], NodeID = (i + 1).ToString(), Icon = icon_array[i], Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } if (Session["USER_RIGHT"].ToString() == "AD" && Session["USER_ID"].ToString() == "admin") { Ext.Net.Node groupNode = new Ext.Net.Node() { Text = " 授权管理", NodeID = "8", Icon = Icon.KeyStart, Cls = "large-font", Leaf = true }; root.Children.Add(groupNode); } TreePanel1.Render(); }
public void delecte(string id) { try { if (serviceManager.DeleteVehicles(id) > 0) { GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager70", "删除成功")); UserInfo userinfo = Session["Userinfo"] as UserInfo; logManager.InsertLogRunning(userinfo.UserName, "" + GetLangStr("ImportantManager71", "删除:") + "" + id + Request.QueryString["type"], userinfo.NowIp, "3"); } else { Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager72", "删除失败")); } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("ImportantManager.aspx-delecte", ex.Message + ";" + ex.StackTrace, "delecte has an exception"); } }
/// <summary> /// 添加或更新重点车辆信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void GengXin_Click(object sender, DirectEventArgs e) { try { //储存修改前数据 string[] updt = new string[] { uiDepartment1.DepertName, TxtHphm.Text, CmbHpzl.Value.ToString(), }; UserInfo userinfo = Session["userinfo"] as UserInfo; Hashtable hs = new Hashtable(); //当所属机构为空时 默认为 if (string.IsNullOrEmpty(uiDepartment1.DepertId)) { hs.Add("GLBM", userinfo.DeptCode); } else { hs.Add("GLBM", uiDepartment1.DepertId); } hs.Add("HPHM", VehicleHead.VehicleText + this.TxtHphm.Text.ToUpper()); if (!string.IsNullOrEmpty(TxtClxh.Text)) { hs.Add("CLXH", this.TxtClxh.Text.ToString()); } else { hs.Add("CLXH", ""); } if (!string.IsNullOrEmpty(TxtCjh.Text)) { hs.Add("CJH", this.TxtCjh.Text.ToString()); } else { hs.Add("CJH", ""); } if (!string.IsNullOrEmpty(TxtFdjh.Text)) { hs.Add("FDJH", this.TxtFdjh.Text.ToString()); } else { hs.Add("FDJH", ""); } if (!string.IsNullOrEmpty(TxtHdkl.Text)) { hs.Add("HDKL", this.TxtHdkl.Text.ToString()); } else { hs.Add("HDKL", ""); } if (TxtSjxm.Text != "") { hs.Add("SJXM", this.TxtSjxm.Text.ToString()); } else { hs.Add("SJXM", ""); } if (!string.IsNullOrEmpty(TxtLxdh.Text)) { hs.Add("LXDH", this.TxtLxdh.Text.ToString()); } else { hs.Add("LXDH", ""); } if (!string.IsNullOrEmpty(TxtSjhm.Text)) { hs.Add("SJHM", this.TxtSjhm.Text.ToString()); } else { hs.Add("SJHM", ""); } if (!string.IsNullOrEmpty(TxtHjhm.Text)) { hs.Add("HJHM", this.TxtHjhm.Text.ToString()); } else { hs.Add("HJHM", ""); } hs.Add("HPZL", this.CmbHpzl.Text.ToString()); if (this.CmbClzl.SelectedIndex != -1) { hs.Add("CLZL", this.CmbClzl.Text.ToString()); } else { hs.Add("CLZL", ""); } if (this.CmbGPS.SelectedIndex != -1) { hs.Add("GPS", this.CmbGPS.Text.ToString()); } else { hs.Add("GPS", ""); } string lurutime = DateField1.SelectedDate.ToString("yyyy-MM-dd") + " 00:00:00"; hs.Add("GZRQ", lurutime); if (!string.IsNullOrEmpty(TxtRyzk.Text)) { hs.Add("RYZK", this.TxtRyzk.Text.ToString()); } else { hs.Add("RYZK", ""); } if (!string.IsNullOrEmpty(TxtClpp.Text)) { hs.Add("CLPP", this.TxtClpp.Text.ToString()); } else { hs.Add("CLPP", ""); } if (!string.IsNullOrEmpty(TxtClzt.Text)) { hs.Add("CLZT", this.TxtClzt.Text.ToString()); } else { hs.Add("CLZT", ""); } if (!string.IsNullOrEmpty(this.TimeStart.Value.ToString())) { hs.Add("KSSJ", this.TimeStart.Value.ToString().Substring(0, 5)); } else { hs.Add("KSSJ", ""); } if (!string.IsNullOrEmpty(this.TimeEnd.Value.ToString())) { hs.Add("JSSJ", this.TimeEnd.Value.ToString().Substring(0, 5)); } else { hs.Add("JSSJ", ""); } if (Session["stationlist"] != null) { List <string> listid = Session["stationlist"] as List <string>; string kkids = ""; for (int i = 0; i < listid.Count; i++) { kkids += (i == 0 ? "" : ",") + listid[i]; } hs.Add("KKIDS", kkids); } else { hs.Add("KKIDS", ""); } if (Hidden1.Value.ToString() == "1") { string ID = Math.Abs(Guid.NewGuid().ToString().GetHashCode()).ToString(); hs.Add("ID", ID); if (serviceManager.insertVehicles(hs) > 0) { Window1.Hide(); Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager62", "添加成功")); GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); //添加记录日志 logManager.InsertLogRunning(userinfo.UserName, "" + GetLangStr("ImportantManager63", "添加:") + "" + ID + Request.QueryString["type"], userinfo.NowIp, "1"); } } if (Hidden1.Value.ToString() == "2") { hs.Add("ID", Hidden_id.Value.ToString()); if (serviceManager.updateVehicles(hs) > 0) { Window1.Hide(); Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager64", "修改成功")); //Ext.Net.X.Msg.Alert(GetLangStr("ImportantManager51", "信息提示"), GetLangStr("ImportantManager52", "修改成功")).Show(); GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); //修改记录日志 } } FrmClear(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("ImportantManager.aspx-GengXin_Click", ex.Message + ";" + ex.StackTrace, "GengXin_Click has an exception"); } }
private Ext.Net.NodeCollection BuildTree1(Ext.Net.NodeCollection nodes) { Ext.Net.Button btnExpand = new Ext.Net.Button(); btnExpand.Text = "展开"; btnExpand.Listeners.Click.Handler = TreePanel1.ClientID + ".expandAll();"; Ext.Net.Button btnCollapse = new Ext.Net.Button(); btnCollapse.Text = "收合"; btnCollapse.Listeners.Click.Handler = TreePanel1.ClientID + ".collapseAll();"; Ext.Net.Button btnCount = new Ext.Net.Button(); btnCount.Text = "前" + iiCNT.ToString(); btnCount.Click += btnCount_Click; btnCount.Visible = false; btnCount.AutoPostBack = true; Toolbar toolBar = new Toolbar(); //Tree Head 按鈕 toolBar.ID = "Toolbar"; toolBar.Items.Add(btnExpand); toolBar.Items.Add(btnCollapse); toolBar.Items.Add(btnCount); TreePanel1.TopBar.Add(toolBar); Ext.Net.Node root = new Ext.Net.Node(); root.Text = "PD."; root.NodeID = "__"; root.Cls = "large-font"; root.Expanded = true; //root.Expanded = false; nodes.Add(root); int iii = 0; // 加入人口分布節點 dvFhir.RowFilter = "C5 like '%PD%'"; dvFhir.Sort = "C2 DESC"; iii = dvFhir.Count; Ext.Net.Node groupNode = new Ext.Net.Node() { Text = "人口分布 (" + iii.ToString() + ")", Icon = Icon.ReportUser, NodeID = "PD" + "_", Cls = "large-font" }; root.Children.Add(groupNode); AddChild(groupNode, "PD", "PD", "PD", iiCNT, dvFhir.ToTable()); groupNode.Expanded = false; // 加入血透年限分布節點 dvFhir.RowFilter = "C5 like '%DDD%'"; dvFhir.Sort = "C2 DESC"; iii = dvFhir.Count; groupNode = new Ext.Net.Node() { Text = "血透年限分布 (" + iii.ToString() + ")", Icon = Icon.ReportUser, NodeID = "DDD" + "_", Cls = "large-font" }; root.Children.Add(groupNode); AddChild(groupNode, "DDD", "DDD", "DDD", iiCNT, dvFhir.ToTable()); groupNode.Expanded = false; // 加入死亡率節點 dvFhir.RowFilter = "C5 like '%MR%'"; dvFhir.Sort = "C2 DESC"; iii = dvFhir.Count; groupNode = new Ext.Net.Node() { Text = "死亡率 (" + iii.ToString() + ")", Icon = Icon.ReportUser, NodeID = "MR" + "_", Cls = "large-font" }; root.Children.Add(groupNode); AddChild(groupNode, "MR", "MR", "MR", iiCNT, dvFhir.ToTable()); groupNode.Expanded = false; // 加入血透品質節點 dvFhir.RowFilter = "C5 like '%DQ%'"; dvFhir.Sort = "C2 DESC"; iii = dvFhir.Count; groupNode = new Ext.Net.Node() { Text = "血液透析品质 (" + iii.ToString() + ")", Icon = Icon.ReportUser, NodeID = "DQ" + "_", Cls = "large-font" }; root.Children.Add(groupNode); AddChild(groupNode, "DQ", "DQ", "DQ", iiCNT, dvFhir.ToTable()); groupNode.Expanded = false; // 加入医事人员節點 dvFhir.RowFilter = "C5 like '%Practitioner%'"; dvFhir.Sort = "C2 DESC"; iii = dvFhir.Count; groupNode = new Ext.Net.Node() { Text = "医事人员 (" + iii.ToString() + ")", Icon = Icon.ReportUser, NodeID = "PR" + "_", Cls = "large-font" }; root.Children.Add(groupNode); //AddChild(groupNode, "PR", "PR", "PR", dtPractitioner.Columns.Count, dtPractitioner); AddChild(groupNode, "PR", "PR", "PR", iiCNT, dvFhir.ToTable()); groupNode.Expanded = false; // 加入病患基本数据節點 dvFhir.RowFilter = "C5 like '%Patient%'"; dvFhir.Sort = "C2 DESC"; iii = dvFhir.Count; groupNode = new Ext.Net.Node() { Text = "病患基本数据 (" + iii.ToString() + ")", Icon = Icon.ReportUser, NodeID = "PI" + "_", Cls = "large-font" }; root.Children.Add(groupNode); //AddChild(groupNode, "PI", "PI", "PI", dtPatient.Columns.Count, dtPatient); AddChild(groupNode, "PI", "PI", "PI", iiCNT, dvFhir.ToTable()); groupNode.Expanded = false; // 加入医嘱用药節點 dvFhir.RowFilter = "C5 like '%Medication%'"; dvFhir.Sort = "C2 DESC"; iii = dvFhir.Count; groupNode = new Ext.Net.Node() { Text = "医嘱用药 (" + iii.ToString() + ")", Icon = Icon.ReportUser, NodeID = "MO" + "_", Cls = "large-font" }; root.Children.Add(groupNode); //AddChild(groupNode, "PI", "PI", "PI", dtPatient.Columns.Count, dtPatient); AddChild(groupNode, "MO", "MO", "MO", iiCNT, dvFhir.ToTable()); groupNode.Expanded = false; //-------------------- TreePanel1.Render(); TreePanel1.Expand(false); return(nodes); }
/// <summary> ///更新事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void GengXin_Click(object sender, DirectEventArgs e) { try { string ID = Guid.NewGuid().ToString(); Hashtable hs = new Hashtable(); //当没选择所属单位的时候 默认为371600000000 必须要DEPARTID if (string.IsNullOrEmpty(uiDepartment1.DepertId)) { hs.Add("DEPARTID", "371600000000"); } else { hs.Add("DEPARTID", uiDepartment1.DepertId); } hs.Add("NAME", this.TxtName.Text.ToString()); //警号 if (TxtSiren.Text != "") { // if(TxtSiren.Text== ){ hs.Add("SIREN", this.TxtSiren.Text.ToString()); //} } else { hs.Add("SIREN", ""); } if (this.CmbRanks.SelectedIndex != -1) { hs.Add("RANKS", this.CmbRanks.Text.ToString()); } else { hs.Add("RANKS", ""); } if (this.CmbDuty.SelectedIndex != -1) { hs.Add("PROFESSION", this.CmbDuty.Text.ToString()); } else { hs.Add("PROFESSION", ""); } if (this.CmbFormat.SelectedIndex != -1) { hs.Add("PREPARATIONTYPE", this.CmbFormat.Text.ToString()); } else { hs.Add("PREPARATIONTYPE", ""); } if (this.CmbTeQin.SelectedIndex != -1) { hs.Add("SECRETLEVEL", this.CmbTeQin.Text.ToString()); } else { hs.Add("SECRETLEVEL", ""); } hs.Add("PHONE", this.TxtPhone.Text.ToString()); if (TxtHandSets.Text != "") { hs.Add("HANDSETS", this.TxtHandSets.Text.ToString()); } else { hs.Add("HANDSETS", ""); } if (TxtOfficePhone.Text != "") { hs.Add("OFFICEPHONE", this.TxtOfficePhone.Text.ToString()); } else { hs.Add("OFFICEPHONE", ""); } if (TxtHandSetsCode.Text != "") { hs.Add("HANDSETSCODE", this.TxtHandSetsCode.Text.ToString()); } else { hs.Add("HANDSETSCODE", ""); } if (TxtHandSetsGroup.Text != "") { hs.Add("HANDSETSGROUP", this.TxtHandSetsGroup.Text.ToString()); } else { hs.Add("HANDSETSGROUP", ""); } if (this.CmbMale.SelectedIndex != -1) { hs.Add("SEX", this.CmbMale.Text.ToString()); } else { hs.Add("SEX", ""); } if (TxtAddress.Text != "") { hs.Add("ADDRESS", this.TxtAddress.Text.ToString()); } else { hs.Add("ADDRESS", ""); } string lurutime = DateField1.SelectedDate.ToString("yyyy-MM-dd") + " 00:00:00"; hs.Add("BIRTHDAY", lurutime); if (TxtEqip.Text != "") { hs.Add("POLICEEQUIPMENT", TxtEqip.Text.ToString()); } else { hs.Add("POLICEEQUIPMENT", ""); } if (TxtIdNo.Text != "") { hs.Add("IDNO", TxtIdNo.Text.ToString()); } else { hs.Add("IDNO", ""); } DataTable dt = Session["datatable"] as DataTable; if (Hidden1.Value.ToString() == "1") { DataRow[] rows = dt.Select("col9 ='" + TxtSiren.Text.ToString() + "'"); if (rows.Length > 0) { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("PoliceOfficer52", "警号重复")); return; } hs.Add("USERCODE", serviceManager.GetRecordID()); if (serviceManager.insertSevice(hs) > 0) { Window1.Hide(); Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer53", "添加成功")); lblname = ""; lblname += Bll.Common.AssembleRunLog("", TxtName.Text, GetLangStr("PoliceOfficer18", "姓名"), "0"); lblname += Bll.Common.AssembleRunLog("", xbie, GetLangStr("PoliceOfficer19", "性别"), "0"); lblname += Bll.Common.AssembleRunLog("", TxtSiren.Text, GetLangStr("PoliceOfficer20", "警号"), "0"); logManager.InsertLogRunning(uName, GetLangStr("PoliceOfficer50", "添加") + lblname, nowIp, "1"); GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); } else { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer53", "添加失败")); } } if (Hidden1.Value.ToString() == "2") { DataRow[] rows = dt.Select("col9 ='" + TxtSiren.Text.ToString() + "'"); if (rows.Length > 1) { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("PoliceOfficer52", "警号重复")); return; } hs.Add("USERCODE", Hidden_id.Value.ToString()); if (serviceManager.updateSevice(hs) > 0) { Window1.Hide(); Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer22", "修改成功")); string sw1 = uiDepartment1.DepertName; // 所属单位 string xb1 = CmbMale.Text; //性别 string xm1 = TxtName.Text; //姓名 string cq1 = DateField1.Text; //出生日期 string jz1 = TxtAddress.Text; //家庭住址 string sh1 = TxtIdNo.Text; //身份证号 string jh1 = TxtSiren.Text; //警号 string jx1 = CmbRanks.Text; //警衔 string xw1 = CmbDuty.Text; //现职务 string bb1 = CmbFormat.Text; //编制类别 string tb1 = CmbTeQin.Text; //特勤类别 string sj1 = TxtPhone.Text; //手机 string bh1 = TxtOfficePhone.Text; //办公电话 string st1 = TxtHandSets.Text; //手台 string sth1 = TxtHandSetsCode.Text; //手台呼号 string szh1 = TxtHandSetsGroup.Text; ///手台组号 string jb1 = TxtEqip.Text; //警用装备 this.Hidden_name.Value = xm1; lblname = ""; lblname += Bll.Common.AssembleRunLog(sw, sw1, GetLangStr("PoliceOfficer26", "所属单位"), "0"); lblname += Bll.Common.AssembleRunLog(xm, xm1, GetLangStr("PoliceOfficer29", "姓名"), "0"); lblname += Bll.Common.AssembleRunLog(cq, cq1, GetLangStr("PoliceOfficer30", "出生日期"), "0"); lblname += Bll.Common.AssembleRunLog(jz, jz1, GetLangStr("PoliceOfficer31", "家庭住址"), "0"); lblname += Bll.Common.AssembleRunLog(sh, sh1, GetLangStr("PoliceOfficer32", "身份证号"), "0"); lblname += Bll.Common.AssembleRunLog(jh, jh1, GetLangStr("PoliceOfficer33", "警号"), "0"); lblname += Bll.Common.AssembleRunLog(jx, jx1, GetLangStr("PoliceOfficer34", "警衔"), "0"); lblname += Bll.Common.AssembleRunLog(xw, xw1, GetLangStr("PoliceOfficer36", "现职务"), "0"); lblname += Bll.Common.AssembleRunLog(bb, bb1, GetLangStr("PoliceOfficer38", "编制类别"), "0"); lblname += Bll.Common.AssembleRunLog(tb, tb1, GetLangStr("PoliceOfficer40", "特勤级别"), "0"); lblname += Bll.Common.AssembleRunLog(sj, sj1, GetLangStr("PoliceOfficer42", "手机"), "0"); lblname += Bll.Common.AssembleRunLog(bh, bh1, GetLangStr("PoliceOfficer43", "办公电话"), "0"); lblname += Bll.Common.AssembleRunLog(st, st1, GetLangStr("PoliceOfficer44", "手台"), "0"); lblname += Bll.Common.AssembleRunLog(sth, sth1, GetLangStr("PoliceOfficer45", "手台呼号"), "0"); lblname += Bll.Common.AssembleRunLog(szh, szh1, GetLangStr("PoliceOfficer46", "手台组号"), "0"); lblname += Bll.Common.AssembleRunLog(jb, jb1, GetLangStr("PoliceOfficer47", "警用装备"), "0"); if (!xb.Equals(xb1)) { if (Convert.ToInt32(xb1) == 0) { xb1 = GetLangStr("PoliceOfficer37", "女"); // return; } if (Convert.ToInt32(xb1) == 1) { xb1 = GetLangStr("PoliceOfficer39", "男"); //return; } if (Convert.ToInt32(xb1) == 2) { xb1 = GetLangStr("PoliceOfficer61", "自定义"); //return; } lblname += GetLangStr("PoliceOfficer27", ";性别:") + xb1; } logManager.InsertLogRunning(uName, GetLangStr("PoliceOfficer13", "修改[") + xm1 + GetLangStr("PoliceOfficer62", "]用户:") + lblname, nowIp, "1"); GridDataBind(GetWhere()); BuildTree(TreePanel1.Root); TreePanel1.Render(); } else { Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer52", "修改失败")); } } FrmClear(); } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("PoliceOfficer.aspx-GengXin_Click", ex.Message + ";" + ex.StackTrace, "GengXin_Click has an exception"); } }
/// <summary> /// 更新设备信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void UpdateDevice(object sender, DirectEventArgs e) { try { Hashtable hs = new Hashtable(); hs.Add("device_id", Text_SBBH.Text.ToString()); hs.Add("device_idext", TxtDeviceIdExt.Text); hs.Add("device_name", Text_SBMC.Text.ToString()); if (Cob_SBLX.SelectedIndex != -1) { hs.Add("device_type_id", Cob_SBLX.Value.ToString()); } else { NoticeError(GetLangStr("DeviceManager67", "信息错误"), GetLangStr("DeviceManager68", "设备类型未选择")); return; } if (Cob_SBXH.SelectedIndex != -1) { hs.Add("device_mode_id", Cob_SBXH.Value.ToString()); } else { NoticeError(GetLangStr("DeviceManager67", "信息错误"), GetLangStr("DeviceManager68", "设备型号未选择")); return; } hs.Add("ipaddress", Text_IP.Text.ToString()); hs.Add("port", Text_DK.Text.ToString()); if (!string.IsNullOrEmpty(Text_TYDS.Text)) { hs.Add("channels", Text_TYDS.Text.ToString()); } else { hs.Add("channels", "0"); } hs.Add("username", Text_YHM.Text.ToString()); hs.Add("password", Text_MM.Text.ToString()); hs.Add("createdate", "now()"); hs.Add("dev_length", Text_Ledth.Text.ToString()); hs.Add("dev_width", Text_Width.Text.ToString()); hs.Add("port_num", Text_CKH.Text.ToString()); hs.Add("port_param", Text_CKCS.Text.ToString()); hs.Add("protocol_id", CommonExt.IsNullComboBox(Cob_TXXY, "")); hs.Add("comm_type_id", CommonExt.IsNullComboBox(Cob_TXLX, "")); hs.Add("build_id", CommonExt.IsNullComboBox(Cob_JSDW, "")); hs.Add("maintain_company_id", CommonExt.IsNullComboBox(Cob_WHDW, "")); hs.Add("make_company_id", CommonExt.IsNullComboBox(Cob_ZZCS, "")); hs.Add("isuse", CommonExt.IsNullComboBox(Cob_SFSY, "1")); if (deviceManager.UptateDeviceInfo(hs) > 0) { if (HidSaveFlag.Value.Equals("1")) { if (CheckSave.Checked) { Window4.Hide(); } else { Text_SBMC.Reset(); Text_SBBH.Reset(); Text_IP.Reset(); } } else { Window4.Hide(); } if (Cob_SBLX.SelectedIndex != -1) { LedDataBind(" 1=1 and a.device_type_id='" + Cob_SBLX.Value.ToString() + "'"); } else { LedDataBind(" 1=1"); } if (types == 1) { string sbmcs = Text_SBMC.Text; string sblxs = Cob_SBLX.SelectedItem.Text; string kksbs = Cob_SBXH.SelectedItem.Text; string sfsys = Cob_SFSY.SelectedItem.Text; string sbips = Text_IP.Text; string sbdks = Text_DK.Text; string sbtdss = Text_TYDS.Text; string wbbhs = TxtDeviceIdExt.Text; string txlxs = Cob_TXLX.SelectedItem.Text; string txxys = Cob_TXXY.SelectedItem.Text; string yhms = Text_YHM.Text; string mms = Text_MM.Text; string sbcds = Text_Ledth.Text; string sbkds = Text_Width.Text; string ckhs = Text_CKH.Text; string ckcss = Text_CKCS.Text; string jsdws = Cob_JSDW.SelectedItem.Text; string whdws = Cob_WHDW.SelectedItem.Text; string sbzzss = Cob_ZZCS.SelectedItem.Text; string lblname = ""; lblname += Bll.Common.AssembleRunLog(sblx, sblxs, GetLangStr("DeviceManager2", "设备类型"), "1"); lblname += Bll.Common.AssembleRunLog(kksb, kksbs, GetLangStr("DeviceManager71", "卡口设备"), "1"); lblname += Bll.Common.AssembleRunLog(sfsy, sfsys, GetLangStr("DeviceManager31", "是否使用"), "1"); lblname += Bll.Common.AssembleRunLog(sbip, sbips, GetLangStr("DeviceManager19", "设备Ip"), "1"); lblname += Bll.Common.AssembleRunLog(sbdk, sbdks, GetLangStr("DeviceManager20", "设备端口"), "1"); lblname += Bll.Common.AssembleRunLog(sbtds, sbtdss, GetLangStr("DeviceManager37", "设备通道数"), "1"); lblname += Bll.Common.AssembleRunLog(wbbh, wbbhs, GetLangStr("DeviceManager21", "外部编号"), "1"); lblname += Bll.Common.AssembleRunLog(txlx, txlxs, GetLangStr("DeviceManager41", "通讯类型"), "1"); lblname += Bll.Common.AssembleRunLog(txxy, txxys, GetLangStr("DeviceManager43", "通讯协议"), "1"); lblname += Bll.Common.AssembleRunLog(yhm, yhms, GetLangStr("DeviceManager45", "用户名"), "1"); lblname += Bll.Common.AssembleRunLog(mm, mms, GetLangStr("DeviceManager47", "密码"), "1"); lblname += Bll.Common.AssembleRunLog(sbcd, sbcds, GetLangStr("DeviceManager49", "设备长度"), "1"); lblname += Bll.Common.AssembleRunLog(sbkd, sbkds, GetLangStr("DeviceManager51", "设备宽度"), "1"); lblname += Bll.Common.AssembleRunLog(ckh, ckhs, GetLangStr("DeviceManager53", "串口号"), "1"); lblname += Bll.Common.AssembleRunLog(ckcs, ckcss, GetLangStr("DeviceManager55", "串口参数"), "1"); lblname += Bll.Common.AssembleRunLog(jsdw, jsdws, GetLangStr("DeviceManager58", "建设单位"), "1"); lblname += Bll.Common.AssembleRunLog(whdw, whdws, GetLangStr("DeviceManager60", "维护单位"), "1"); lblname += Bll.Common.AssembleRunLog(sbzzs, sbzzss, GetLangStr("DeviceManager62", "设备制造商"), "1"); logManager.InsertLogRunning(uName, GetLangStr("DeviceManager72", "修改:[") + sbmc + "]" + lblname, nowIp, "2"); Notice(GetLangStr("DeviceManager70", "信息提示"), GetLangStr("DeviceManager69", "信息保存成功")); //页面加载方法 BuildTree(TreePanel1.Root); TreePanel1.Render(); types = 0; } else { InsertLog(); } } } catch (Exception ex) { ILog.WriteErrorLog(ex); logManager.InsertLogError("DeviceManager.aspx-UpdateDevice", ex.Message + ";" + ex.StackTrace, "UpdateDevice has an exception"); } }