Beispiel #1
0
        public void Insert_Update_Delete(Cls_LoaiThietBi_DTA LoaiTB_Data, string sThucThi)
        {
            sConn.Open();

            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "SP_LoaiThietBi";
            cmd.Connection  = this.sConn;
            cmd.CommandType = CommandType.StoredProcedure;

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

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

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

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

            sConn.Close();
        }
Beispiel #2
0
 public void Insert_Update_Delete(Cls_LoaiThietBi_DTA LoaiTB_Data, string sThucThi)
 {
     LoaiTB_BUS.Insert_Update_Delete(LoaiTB_Data, sThucThi);
 }