示例#1
0
        public void Insert_Update_Delete(Cls_LoaiKhachHang_DTA LoaiKH_Data, string sThucThi)
        {
            sConn.Open();
            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "SP_LoaiKhachHang";
            cmd.Connection = this.sConn;
            cmd.CommandType = CommandType.StoredProcedure;

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

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

            cmd.Parameters.Add("@SoLuong", SqlDbType.Int);
            cmd.Parameters["@SoLuong"].Value = LoaiKH_Data.SoLuong;

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

            sConn.Close();
        }
示例#2
0
 public Cls_LoaiKhachHang_DTA(Cls_LoaiKhachHang_DTA LoaiKH_Data)
 {
     MaLoaiKH  = LoaiKH_Data.MaLoaiKH;
     TenLoaiKH = LoaiKH_Data.TenLoaiKH;
     SoLuong   = LoaiKH_Data.SoLuong;
 }
示例#3
0
 public void Insert_Update_Delete(Cls_LoaiKhachHang_DTA LoaiKH_Data,string sThucThi)
 {
     LoaiKH_Bus.Insert_Update_Delete(LoaiKH_Data, sThucThi);
 }
示例#4
0
 public Cls_LoaiKhachHang_DTA(Cls_LoaiKhachHang_DTA LoaiKH_Data)
 {
     MaLoaiKH = LoaiKH_Data.MaLoaiKH;
     TenLoaiKH = LoaiKH_Data.TenLoaiKH;
     SoLuong = LoaiKH_Data.SoLuong;
 }