Exemple #1
0
        //----------------------------------------------------------------
        //HAM PHU
        public void addParameter(SqlCommand cmd, ET_TheLoai eT_TheLoai, String[] strNameParametor)
        {
            ArrayList list = eT_TheLoai.getAllProperties();

            foreach (string item in strNameParametor)
            {
                SqlParameter pt = new SqlParameter(item, list[Array.IndexOf(strNameParametor, item)]);
                cmd.Parameters.Add(pt);
            }
        }
Exemple #2
0
 //----------------------------------------------------------------
 //THEM, XOA, SUA
 public bool themTheLoai(ET_TheLoai eT_TheLoai)
 {
     try
     {
         openDB();
         SqlCommand cmd = HandleCMD.proc("sp_ThemTheLoai", _con);
         addParameter(cmd, eT_TheLoai, strNameParametor);
         if (this.cmdExecuted(cmd))
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("ERROR: " + ex.Message);
         return(false);
     }
     finally
     {
         closeDB();
     }
     return(false);
 }
Exemple #3
0
 public bool suaChiTietHD(ET_TheLoai eT_TheLoai)
 {
     return(dal_theLoai.suaTheLoai(eT_TheLoai));
 }
Exemple #4
0
 public bool themChiTietHD(ET_TheLoai eT_TheLoai)
 {
     return(dal_theLoai.themTheLoai(eT_TheLoai));
 }