Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public void Nhap()
        {
            do
            {
                Console.Write("Nhap ma nhan vien: ");
                Manv1 = Console.ReadLine().Trim();
            } while (Manv1.Trim().Length == 0 || Manv1.Trim().Length > 10);
            do
            {
                Console.Write("Nhap ten nhan vien: ");
                Hoten1 = Console.ReadLine();
            } while (Hoten1.Trim().Length == 0 || Hoten1.Trim().Length > 20);

            do
            {
                Console.Write("Nhap gioi tinh: ");
                Gioitinh1 = Console.ReadLine();
            } while (Gioitinh1.Trim().Length == 0 || Gioitinh1.Trim().Length > 5);
            do
            {
                Console.Write("Nhap nam sinh: ");
                NamSinh1 = Console.ReadLine();
            } while (NamSinh1.Trim().Length == 0 || NamSinh1.Trim().Length > 5);
            do
            {
                Console.Write("Nhap chuc vu nhan vien: ");
                Chucvu = Console.ReadLine();
            } while (Chucvu.Trim().Length == 0 || Chucvu.Trim().Length > 10);
            do
            {
                Console.Write("Nhap dia chi: ");
                Diachi = Console.ReadLine().Trim();
            } while (Diachi1.Trim().Length == 0 || Diachi1.Trim().Length > 10);
            do
            {
                Console.Write("Nhap so dien thoai: ");
                Sodt = Console.ReadLine();
            } while (Sodt.Trim().Length == 0 || Sodt.Trim().Length > 11);
        }
Ejemplo n.º 4
0
        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);
        }