예제 #1
0
        public KhachHang(DangNhap frm2)
        {
            InitializeComponent();
            Connect(frm2);
            f2 = frm2;
            SqlCommand com = new SqlCommand("Lay_MaNguoiDung", Con);

            com.CommandType = CommandType.StoredProcedure;
            com.Parameters.AddWithValue("@ten_Dang_Nhap", SqlDbType.VarChar).Value = f2.textTenDangNhap.Text.Trim();
            com.Parameters.AddWithValue("@LoaiTaiKhoan", SqlDbType.Int).Value      = 0;
            com.Parameters.Add("@MaNguoiDung", SqlDbType.VarChar).Direction        = ParameterDirection.ReturnValue;
            com.ExecuteNonQuery();
            MaNguoiDung = com.Parameters["@MaNguoiDung"].Value.ToString();
            Disconnect();
        }
예제 #2
0
        public static void Connect(DangNhap frm2)
        {
            Con = new SqlConnection();   //Khởi tạo đối tượng
            string connString = @"Data Source=.;Initial Catalog=QLNha;User ID=";

            connString          += frm2.textTenDangNhap.Text;
            connString          += ";Password="******"Kết nối thành công");
             * else MessageBox.Show("Không thể kết nối với dữ liệu");*/
        }
예제 #3
0
 public ChinhSuaKhachHang(DangNhap frm2)
 {
     InitializeComponent();
     f2 = frm2;
     label6.Hide();
 }
예제 #4
0
 public FrmCNNhaBan(DangNhap frm2)
 {
     InitializeComponent();
     f2 = frm2;
 }
예제 #5
0
 public frmCNNhaThue(DangNhap frm2)
 {
     InitializeComponent();
     f2 = frm2;
 }
예제 #6
0
 public NVDev(DangNhap frm2)
 {
     InitializeComponent();
     f2 = frm2;
 }