• 1405/08/11

تمرین جلسه 115 :

با سلام 

 

using System;
using System.Collections.Generic;
using System.Text;

namespace DataLayer.Models
{
    public class UserInformation
    {
        public int UserId { get; set; }
        public string UserName { get; set; } = "admin";
        public string UserPassword { get; set; } = "admin";
    }
}
using Barnamenevis.Net.RtlMessageBox.WindowsForms;
using DataLayer.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace BookKeeper
{
    public partial class frmLogin : Form
    {
     
        public frmLogin()
        {
            InitializeComponent();
        }

        private void frmLogin_Load(object sender, EventArgs e)
        {

        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            UserInformation userInformation = new UserInformation();
            
            if (txtUserName.Text.Trim().ToLower() == userInformation.UserName && txtPassword.Text.Trim().ToLower() == userInformation.UserPassword)
            {
                DialogResult = DialogResult.OK;
            }
            else
            {
                RtlMessageBox.Show("رمز عبور یا نام کاربری اشتباه است", "خطا", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Warning);
            }
        }
    }
}
  • 1405/08/11
  • ساعت 15:15

عالی بود 

یه فونت خوب کم داره 


  • 1405/08/12
  • ساعت 13:13

ممنونم 🙏
 چشم. چطوره؟


  • 1405/08/12
  • ساعت 13:27

عالی