using DevExpress.XtraEditors; 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 { public partial class FrmLogin : DevExpress.XtraEditors.XtraForm { public FrmLogin() { InitializeComponent(); btnLogin.Click += BtnLogin_Click; btnCancel.Click += BtnCancel_Click; } private void BtnCancel_Click(object sender, EventArgs e) { if (Msg.AskQuestion("确定要退出系统吗?")) { // frmMain1.IsClosing = true; Application.Exit(); } } private void BtnLogin_Click(object sender, EventArgs e) { //int i = 199; //ShowDialogForm sdf = new ShowDialogForm("提示", "正在登录......", "请耐心等候,正在验证您的身份!", i); //for (int j = 1; j < i; j++) //{ // sdf.SetCaption("执行进度(" + j.ToString() + "/" + i.ToString() + ")"); //} var _obj = new { accountPwd = txtUser.Text.Trim(), accountNo = txtPwd.Text.Trim(), orgGuid = Guid.NewGuid() }; string json = JsonConvert.SerializeObject(_obj); try { Utility.HttpPost("", "User/UserLogin", json); } catch (Exception ex) { throw ex; } // sdf.Close(); } } }