From 01738c21cdb08fee76aa53ff870a38a00b4f5df4 Mon Sep 17 00:00:00 2001
From: lg <999544862qq.com>
Date: 星期五, 13 九月 2024 12:01:18 +0800
Subject: [PATCH] 基础资料
---
DevApp/Gs.DevApp/DevFrm/User/Organization.cs | 44 +++++++++++++++++++-------------------------
1 files changed, 19 insertions(+), 25 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/User/Organization.cs b/DevApp/Gs.DevApp/DevFrm/User/Organization.cs
index 3b094b4..ec5df29 100644
--- a/DevApp/Gs.DevApp/DevFrm/User/Organization.cs
+++ b/DevApp/Gs.DevApp/DevFrm/User/Organization.cs
@@ -1,4 +1,4 @@
-锘縰sing Gs.DevApp.Models;
+锘縰sing Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
@@ -19,8 +19,7 @@
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)
@@ -29,7 +28,7 @@
if (clickedNode.FirstNode == null)
{
string rowGuid = clickedNode.Name.ToString();
- GetModel(rowGuid, false, 999);
+ getModel(rowGuid, false, 999);
}
}
/// <summary>
@@ -71,7 +70,7 @@
{
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)
@@ -88,7 +87,7 @@
private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
{
UtilityHelper.ChangeTab(xtraTabControl1, 0);
- GetTree();
+ getTree();
}
@@ -100,15 +99,15 @@
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>
/// 鏂板浜嬩欢
@@ -153,10 +152,10 @@
txt_conTel.Focus();
return;
}
- if (txt_status.SelectedIndex <= 0)
+ if (txt_isStatus.SelectedIndex <= 0)
{
Gs.DevApp.ToolBox.MsgHelper.Warning("鐘舵�佷笉鑳戒负绌猴紒");
- txt_status.Focus();
+ txt_isStatus.Focus();
return;
}
string _upGuid = txt_upGuid.Text.Trim().Length > 0 ? txt_upGuid.SelectedValue.ToString() : "";
@@ -167,13 +166,12 @@
name = txt_name.Text.Trim(),//鍚嶇О
conPeople = txt_conPeople.Text,//鑱旂郴浜�
conTel = txt_conPeople.Text,//鑱旂郴鐢佃瘽
- status = txt_status.SelectedIndex,//鐘舵��
-
+ isStatus = txt_isStatus.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)
@@ -189,22 +187,21 @@
}
}
- private void GetTree()
+ private void getTree()
{
tlMenu.Nodes.Clear();
ImageList imageList = new ImageList();
imageList.Images.Add("icon1", Properties.Resources.publicfix_32x32);
imageList.Images.Add("icon2", Properties.Resources.user_16x16);
tlMenu.ImageList = imageList;
- Models.PageQueryModel pgq = new Models.PageQueryModel(1, 999999, "name", "desc", "", "");
+ PageQueryModel pgq = new 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=''");
+ DataRow[] drGrp = dt.Select("upGuid='' or upguid is null");
DataTable dtComList = new DataTable();
dtComList.Columns.Add("guid", typeof(string));
dtComList.Columns.Add("name", typeof(string));
@@ -237,7 +234,7 @@
}
}
- private void GetModel(string strGuid, bool isEdit, int tabIdx)
+ private void getModel(string strGuid, bool isEdit, int tabIdx)
{
if (string.IsNullOrEmpty(strGuid))
{
@@ -249,10 +246,9 @@
{
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)
{
@@ -268,7 +264,5 @@
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
-
-
}
}
\ No newline at end of file
--
Gitblit v1.9.3