public Cls_LoaiPhong_DTA(Cls_LoaiPhong_DTA LPhong_Data) { MaLoai = LPhong_Data.MaLoai; TenLoai = LPhong_Data.TenLoai; GioCD = LPhong_Data.GioCD; GioBT = LPhong_Data.GioBT; }
public Cls_LoaiPhong_DTA(Cls_LoaiPhong_DTA LPhong_Data) { MaLoai = LPhong_Data.MaLoai; TenLoai = LPhong_Data.TenLoai; GioCD = LPhong_Data.GioCD; GioBT = LPhong_Data.GioBT; }
public void Insert_Update_Delete(Cls_LoaiPhong_DTA LP_Data, string sThucThi) { sConn.Open(); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "SP_LoaiPhong"; cmd.Connection = this.sConn; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@MaLoai", SqlDbType.Char); cmd.Parameters["@MaLoai"].Value = LP_Data.MaLoai; cmd.Parameters.Add("@TenPhong", SqlDbType.NVarChar); cmd.Parameters["@TenPhong"].Value = LP_Data.TenLoai; cmd.Parameters.Add("@GioCD", SqlDbType.Float); cmd.Parameters["@GioCD"].Value = LP_Data.GioCD; cmd.Parameters.Add("@GioBT", SqlDbType.Float); cmd.Parameters["@GioBT"].Value = LP_Data.GioBT; cmd.Parameters.Add("@sqlTemp", SqlDbType.NVarChar); if (sThucThi == "Insert" || sThucThi == "Delete" || sThucThi == "Update") cmd.Parameters["@sqlTemp"].Value = sThucThi; cmd.ExecuteNonQuery(); sConn.Close(); }
public void Insert_Update_Delete(Cls_LoaiPhong_DTA LP_Data,string sThucThi) { LP_Bus.Insert_Update_Delete(LP_Data, sThucThi); }