public Cls_ChiTietDichVu_DTA(Cls_ChiTietDichVu_DTA CTDV_DATA) { MaDV = CTDV_DATA.MaDV; MaPH = CTDV_DATA.MaPH; DonGia = CTDV_DATA.DonGia; SoLuong = CTDV_DATA.SoLuong; }
public void Insert_Update_Delete(Cls_ChiTietDichVu_DTA CTDichVu_Data, string sThucThi) { sConn.Open(); try { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "SP_CTDichVu"; cmd.Connection = this.sConn; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@MaDV", SqlDbType.Char); cmd.Parameters["@MaDV"].Value = CTDichVu_Data.MaDV; cmd.Parameters.Add("@MaPH", SqlDbType.Char); cmd.Parameters["@MaPH"].Value = CTDichVu_Data.MaPH; cmd.Parameters.Add("@DonGia", SqlDbType.Float); cmd.Parameters["@DonGia"].Value = CTDichVu_Data.DonGia; cmd.Parameters.Add("@SoLuong", SqlDbType.Int); cmd.Parameters["@SoLuong"].Value = CTDichVu_Data.SoLuong; cmd.Parameters.Add("@sqlTemp", SqlDbType.NVarChar); if (sThucThi == "Insert" || sThucThi == "Delete" || sThucThi == "Update") { cmd.Parameters["@sqlTemp"].Value = sThucThi; cmd.ExecuteNonQuery(); } } catch (Exception) { throw; } sConn.Close(); }
public void Inser_Update_Delete(Cls_ChiTietDichVu_DTA CTDichVu_DATA,string sThucThi) { CTDichVu_BUS.Insert_Update_Delete(CTDichVu_DATA, sThucThi); }