From 2ba8bd4b8e381e173e10d69396a744708b2f32e5 Mon Sep 17 00:00:00 2001
From: lg <999544862qq.com>
Date: 星期五, 30 八月 2024 11:05:55 +0800
Subject: [PATCH] 用户管理

---
 DevApp/Gs.DevApp/DevFrm/User/RoleAdd.cs |   77 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/User/RoleAdd.cs b/DevApp/Gs.DevApp/DevFrm/User/RoleAdd.cs
new file mode 100644
index 0000000..57fbebb
--- /dev/null
+++ b/DevApp/Gs.DevApp/DevFrm/User/RoleAdd.cs
@@ -0,0 +1,77 @@
+锘縰sing DevExpress.XtraEditors;
+using Gs.DevApp.Models;
+using Gs.DevApp.ToolBox;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Gs.DevApp.DevFrm.User
+{
+    public partial class RoleAdd : DevExpress.XtraEditors.XtraForm
+    {
+        public RoleAdd(string guid)
+        {
+            InitializeComponent();
+            btnSave.Click += BtnSave_Click;
+            btnEsc.Click += BtnEsc_Click;
+            lbGuid.Text = guid;
+        }
+
+        private void BtnEsc_Click(object sender, EventArgs e)
+        {
+            this.Dispose();
+        }
+
+        private void BtnSave_Click(object sender, EventArgs e)
+        {
+            if (string.IsNullOrEmpty(txtName.Text.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("瑙掕壊鍚嶇О涓嶈兘涓虹┖锛�");
+                txtName.Focus();
+                return;
+            }
+            if (string.IsNullOrEmpty(txtRemark.Text.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("瑙掕壊澶囨敞涓嶈兘涓虹┖锛�");
+                txtRemark.Focus();
+                return;
+            }
+            if (string.IsNullOrEmpty(txtStatus.Text.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("瑙掕壊鐘舵�佷笉鑳戒负绌猴紒");
+                txtRemark.Focus();
+                return;
+            }
+            var _obj = new
+            {
+                guid=lbGuid.Text.Trim(),
+                roleName = txtName.Text.Trim(),
+                rolRemark = txtRemark.Text.Trim(),
+                status = txtStatus.SelectedIndex,//鐘舵��
+            };
+            string strJson = "";
+            try
+            {
+                strJson = UtilityHelper.HttpPost("", "Role/EditModel", JsonConvert.SerializeObject(_obj));
+                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                if (_rtn.rtnCode > 0)
+                {
+
+                }
+            }
+            catch (Exception ex)
+            {
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3