| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Server;
- using CoreFS.CA06;
- namespace Core.StlMes.Client.ZGMil.Popup
- {
- public partial class FrmChangeGroup : FrmBase
- {
- OpeBase _ob = null;
- public FrmChangeGroup(OpeBase ob)
- {
- InitializeComponent();
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- _ob = ob;
- }
- public string _UserID //用户名 用于传值
- {
- get { return txtUserID.Text; }
- }
- public string _PassWord //密码 用于传值
- {
- get { return txtPassWord.Text; }
- }
- private void BtnOK()
- {
- DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FeedSawResult.getUser", new object[] { txtUserID.Text, txtPassWord.Text }, _ob);
- if (dt.Rows.Count > 0)
- {
- this.DialogResult = DialogResult.OK;
- }
- else
- {
- MessageBox.Show("用户名,密码错误。");
- return;
- }
- }
- private void btnCommit_Click(object sender, EventArgs e)
- {
- BtnOK();
- }
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- //回车事件
- private void txtUserID_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == (char)13)
- {
- this.SelectNextControl(this.ActiveControl, true, true, true, true);
- }
- }
- //回车事件
- private void txtPassWord_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == (char)13)
- {
- BtnOK();
- }
- }
- }
- }
|