예제 #1
0
 public static void AppIni()
 {
     InI.filePath = InIPath;
     if (string.IsNullOrEmpty(InI.ReadValue("app", "svr")))
     {
         InI.Writue("app", "svr", "");
     }
 }
예제 #2
0
        private void Login()
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                sa_t_operator_i oper = new sa_t_operator_i()
                {
                    oper_id = this.txtOperId.Text,
                    oper_pw = this.txtPwd.Text
                };

                IBLL.IOper bll = new BLL.OperBLL();

                if (bll.Login(oper))
                {
                    Program.oper = oper;

                    InI.Writue("app", "oper_id", oper.oper_id);

                    this.DialogResult = DialogResult.Yes;
                    this.Close();
                }
                else
                {
                    new MsgForm("账号/密码错误").ShowDialog();
                }
            }
            catch (Exception e)
            {
                LogHelper.writeLog("frmLogin", e.ToString());
                MsgForm.ShowFrom(e);
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }