| | |
| | | this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | tlMenu.DoubleClick += TlMenu_DoubleClick; |
| | | GetTree(); |
| | | UtilityHelper.SetFont(panel1); |
| | | getTree(); |
| | | } |
| | | |
| | | private void TlMenu_DoubleClick(object sender, EventArgs e) |
| | |
| | | if (clickedNode.FirstNode == null) |
| | | { |
| | | string rowGuid = clickedNode.Name.ToString(); |
| | | GetModel(rowGuid, false, 999); |
| | | getModel(rowGuid, false, 999); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "Organization/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | if (_rtn.rtnCode > 0) { GetTree(); } |
| | | if (_rtn.rtnCode > 0) { getTree(); } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | GetTree(); |
| | | getTree(); |
| | | } |
| | | |
| | | |
| | |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | TreeNode clickedNode = tlMenu.SelectedNode; |
| | | if (clickedNode.FirstNode != null) |
| | | return; |
| | | //if (clickedNode.FirstNode != null) |
| | | // return; |
| | | string rowGuid = clickedNode.Name.ToString(); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | GetModel(rowGuid, true, 1); |
| | | getModel(rowGuid, true, 1); |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | |
| | | conPeople = txt_conPeople.Text,//联系人 |
| | | conTel = txt_conPeople.Text,//联系电话 |
| | | status = txt_status.SelectedIndex,//状态 |
| | | |
| | | factory = txt_factory.Text,//组织编号 |
| | | }; |
| | | string strJson = ""; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "Organization/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | string strJson = UtilityHelper.HttpPost("", "Organization/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | |
| | | } |
| | | } |
| | | |
| | | private void GetTree() |
| | | private void getTree() |
| | | { |
| | | tlMenu.Nodes.Clear(); |
| | | ImageList imageList = new ImageList(); |
| | |
| | | tlMenu.ImageList = imageList; |
| | | Models.PageQueryModel pgq = new Models.PageQueryModel(1, 999999, "name", "desc", "", ""); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | string strReturn = ""; |
| | | try |
| | | { |
| | | strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json); |
| | | string strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | DataRow[] drGrp = dt.Select("upGuid=''"); |
| | |
| | | } |
| | | } |
| | | |
| | | private void GetModel(string strGuid, bool isEdit, int tabIdx) |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | { |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | |
| | | { |
| | | guid = strGuid,//主建 |
| | | }; |
| | | string strJson = ""; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "Organization/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | string strJson = UtilityHelper.HttpPost("", "Organization/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |