예제 #1
0
 public Cls_DichVu_DTA(Cls_DichVu_DTA DV_Data)
 {
     MaDV     = DV_Data.MaDV;
     TenDV    = DV_Data.TenDV;
     DVTinh   = DV_Data.DVTinh;
     DonGia   = DV_Data.DonGia;
     MoTa     = DV_Data.MoTa;
     MaLoaiDV = DV_Data.MaLoaiDV;
 }
예제 #2
0
 public Cls_DichVu_DTA(Cls_DichVu_DTA DV_Data)
 {
     MaDV = DV_Data.MaDV;
     TenDV = DV_Data.TenDV;
     DVTinh = DV_Data.DVTinh;
     DonGia = DV_Data.DonGia;
     MoTa = DV_Data.MoTa;
     MaLoaiDV = DV_Data.MaLoaiDV;
 }
예제 #3
0
        public void Insert_Update_Delete(Cls_DichVu_DTA DV_Data,string sThucThi)
        {
            sConn.Open();

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

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

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

            cmd.Parameters.Add("@DonViTinh", SqlDbType.NVarChar);
            cmd.Parameters["@DonViTinh"].Value = DV_Data.DVTinh;

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


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

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

            cmd.Parameters.Add("@sqlTemp", SqlDbType.NVarChar);

            if (sThucThi == "Insert" || sThucThi == "Delete" || sThucThi == "Update")
            {

                cmd.Parameters["@sqlTemp"].Value = sThucThi;
                cmd.ExecuteNonQuery();
            }

            sConn.Close();
        }
예제 #4
0
 public void Insert_Update_Delete(Cls_DichVu_DTA DV_Data,string sThucThi)
 {
     DV_Bus.Insert_Update_Delete(DV_Data, sThucThi);
 }