public void NhapThem()
        {
            do
            {
                Console.Write("\tNhập tên nhân viên: ");
                Hoten1 = Console.ReadLine();
            } while (Hoten1.Trim().Length == 0 || Hoten1.Trim().Length > 20);

            do
            {
                Console.Write("\tGiới tính: ");
                Gioitinh1 = Console.ReadLine();
            } while (Gioitinh1.Trim().Length == 0 || Gioitinh1.Trim().Length > 10);
            do
            {
                Console.Write("\tNăm sinh: ");
                NamSinh1 = Console.ReadLine();
            } while (NamSinh1.Trim().Length == 0 || NamSinh1.Trim().Length > 5);
            do
            {
                Console.Write("\tChức vụ: ");
                Chucvu = Console.ReadLine();
            } while (Chucvu.Trim().Length == 0 || Chucvu.Trim().Length > 10);
            do
            {
                Console.Write("\tĐịa chỉ: ");
                Diachi = Console.ReadLine().Trim();
            } while (Diachi.Trim().Length == 0 || Diachi.Trim().Length > 10);
            do
            {
                Console.Write("\tSố điện thoại: ");
                Sodt = Console.ReadLine();
            } while (Sodt.Trim().Length == 0 || Sodt.Trim().Length > 11);
        }
        public void NhapThem()
        {
            do
            {
                Console.Write("\tNhập tên khách hàng: ");
                Hoten1 = Console.ReadLine();
            } while (Hoten1.Trim().Length == 0 || Hoten1.Trim().Length > 20);

            do
            {
                Console.Write("\tĐịa chỉ: ");
                Diachi = Console.ReadLine();
            } while (Diachi.Trim().Length == 0 || Diachi.Trim().Length > 10);
            do
            {
                Console.Write("\tSố điện thoại: ");
                SoDt = Console.ReadLine();
            } while (SoDt.Trim().Length == 0 || SoDt.Trim().Length > 11);
            do
            {
                Console.Write("\tSố CMT/CCCD: ");
                soCMT = Console.ReadLine();
            } while (soCMT.Trim().Length == 0 || soCMT.Trim().Length > 10);
            TGmua = DateTime.Now.ToString("dd/MM/yyyy");
            do
            {
                Console.Write("\tSố lần ghé thăm cửa hàng:");
                SoLanGheTham1 = int.Parse(Console.ReadLine());
            } while (SoLanGheTham1 < 1);
        }
Exemple #3
0
        public void Nhap()
        {
            do
            {
                Console.Write("Nhập mã nhà cung cấp: ");
                MaNCC = Console.ReadLine().Trim();
            } while (MaNCC.Trim().Length == 0 || MaNCC.Trim().Length > 10);
            do
            {
                Console.Write("Nhập tên nhà cung cấp: ");
                TenNCC = Console.ReadLine();
            } while (TenNCC.Trim().Length == 0 || TenNCC.Trim().Length > 20);

            do
            {
                Console.Write("Nhập địa chỉ: ");
                Diachi = Console.ReadLine();
            } while (Diachi.Trim().Length == 0 || Diachi.Trim().Length > 10);
            do
            {
                Console.Write("Nhập Email: ");
                Email = Console.ReadLine();
            } while (Email.Trim().Length == 0 || Email.Trim().Length > 15);

            do
            {
                Console.Write("Nhập số điện thoại: ");
                SoDT = Console.ReadLine();
            } while (SoDT.Trim().Length == 0 || SoDT.Trim().Length > 11);
        }
        public void Nhap()
        {
            do
            {
                Console.Write("Nhap ma khach hang: ");
                Makh = Console.ReadLine().Trim();
            } while (Makh.Trim().Length == 0 || Makh.Trim().Length > 10);
            do
            {
                Console.Write("Nhap ten khach hang: ");
                Hoten1 = Console.ReadLine();
            } while (Hoten1.Trim().Length == 0 || Hoten1.Trim().Length > 20);

            do
            {
                Console.Write("Dia chi: ");
                Diachi = Console.ReadLine();
            } while (Diachi.Trim().Length == 0 || Diachi.Trim().Length > 10);
            do
            {
                Console.Write("Nhap so dien thoai: ");
                SoDt = Console.ReadLine();
            } while (SoDt.Trim().Length == 0 || SoDt.Trim().Length > 11);
            do
            {
                Console.Write("Nhap so CMT/CCCD: ");
                soCMT = Console.ReadLine();
            } while (soCMT.Trim().Length == 0 || soCMT.Trim().Length > 10);
            do
            {
                Console.Write("Nhap thoi gian mua: ");
                TGmua = Console.ReadLine().Trim();
            } while (TGmua.Trim().Length == 0 || TGmua.Trim().Length > 10);
            do
            {
                Console.Write("So lan ghe tham cua hang:");
                SoLanGheTham1 = int.Parse(Console.ReadLine());
            } while (SoLanGheTham1 < 1);
        }