Beispiel #1
0
 public Cls_NhanVien_DTA(Cls_NhanVien_DTA NV_Data)
 {
     MaNV      = NV_Data.MaNV;
     TenDN     = NV_Data.TenDN;
     MaMaDN    = NV_Data.MaMaDN;
     QuyenDN   = NV_Data.QuyenDN;
     HoTenNV   = NV_Data.HoTenNV;
     NgaySinh  = NV_Data.NgaySinh;
     Phai      = NV_Data.Phai;
     DienThoai = NV_Data.DienThoai;
     DiaChi    = NV_Data.DiaChi;
     LuongNV   = NV_Data.LuongNV;
 }
Beispiel #2
0
         public void Insert_Update_Delete(Cls_NhanVien_DTA NV_Data, string sThucThi)
         {
             sConn.Open();

             SqlCommand cmd = new SqlCommand();
             cmd.CommandText = "SP_NhanVien";
             cmd.Connection = this.sConn;
             cmd.CommandType = CommandType.StoredProcedure;

             cmd.Parameters.Add("@MaNV", SqlDbType.Char);
             cmd.Parameters["@MaNV"].Value = NV_Data.MaNV;

             cmd.Parameters.Add("@TenDN", SqlDbType.NVarChar);
             cmd.Parameters["@TenDN"].Value = NV_Data.TenDN;

             cmd.Parameters.Add("@MatMaDN", SqlDbType.NVarChar);
             cmd.Parameters["@MatMaDN"].Value = NV_Data.MaMaDN;

             cmd.Parameters.Add("@QuyenDN", SqlDbType.NVarChar);
             cmd.Parameters["@QuyenDN"].Value = NV_Data.QuyenDN;

             cmd.Parameters.Add("@HoTenNV", SqlDbType.NVarChar);
             cmd.Parameters["@HoTenNV"].Value = NV_Data.HoTenNV;

             cmd.Parameters.Add("@NgaySinh", SqlDbType.DateTime);
             cmd.Parameters["@NgaySinh"].Value = NV_Data.NgaySinh;

             cmd.Parameters.Add("@Phai", SqlDbType.Bit);
             cmd.Parameters["@Phai"].Value = NV_Data.Phai;

             cmd.Parameters.Add("@DienThoai", SqlDbType.NVarChar);
             cmd.Parameters["@DienThoai"].Value = NV_Data.DienThoai;

             cmd.Parameters.Add("@DiaChi", SqlDbType.NVarChar);
             cmd.Parameters["@DiaChi"].Value = NV_Data.DiaChi;

             cmd.Parameters.Add("@LuongNV", SqlDbType.Float);
             cmd.Parameters["@LuongNV"].Value = NV_Data.LuongNV;

             cmd.Parameters.Add("@sqlTemp", SqlDbType.NVarChar);
             if (sThucThi == "Insert" || sThucThi == "Delete" || sThucThi == "Update")
                 cmd.Parameters["@sqlTemp"].Value = sThucThi;
             cmd.ExecuteNonQuery();

             sConn.Close();
         }
Beispiel #3
0
 public Cls_NhanVien_DTA(Cls_NhanVien_DTA NV_Data)
 {
     MaNV = NV_Data.MaNV;
     TenDN = NV_Data.TenDN;
     MaMaDN = NV_Data.MaMaDN;
     QuyenDN = NV_Data.QuyenDN;
     HoTenNV = NV_Data.HoTenNV;
     NgaySinh = NV_Data.NgaySinh;
     Phai = NV_Data.Phai;
     DienThoai = NV_Data.DienThoai;
     DiaChi = NV_Data.DiaChi;
     LuongNV = NV_Data.LuongNV;
 }
Beispiel #4
0
 public void Insert_Update_Delete(Cls_NhanVien_DTA NV_Data,string sThucThi)
 {
     NV_Bus.Insert_Update_Delete(NV_Data, sThucThi);
 }