/// <summary>
        /// Insert ALL
        /// </summary>
        /// <returns></returns>
        public int Insert()
        {
            //command.Parameters.Add(new SqlParameter("@Ten_kho", Ten_kho));

               DatabaseHelper help = new DatabaseHelper();
               help.ConnectDatabase();
               // insert
               try
               {
               var t = new DM_Don_vi_tinh //Make sure you have a table called test in DB
               {
                   ID_Don_vi_tinh = this.ID_Don_vi_tinh,
                   Ten_don_vi_tinh = this.Ten_don_vi_tinh,
                   // ID = Guid.NewGuid(),

               };

               help.ent.DM_Don_vi_tinh.Add(t);
               help.ent.SaveChanges();
               return 1;
               }
               catch (Exception ex)
               {
               return 0;

               }

               ////Mở
               //m_dbConnection.Open();

               ////Chuẩn bị
               //string sql = "";
               //sql += "INSERT INTO DM_Don_vi_tinh (Ten_don_vi_tinh) ";
               //sql += "VALUES(@Ten_don_vi_tinh)";

               //SqlCommand command = new SqlCommand(sql, m_dbConnection);

               ////command.Parameters.Add("@ID_Don_vi_tinh", SqlDbType.Int).Value = ID_Don_vi_tinh;
               //command.Parameters.Add("@Ten_don_vi_tinh", SqlDbType.NVarChar, 50).Value = Ten_don_vi_tinh;

               //command.CommandType = CommandType.Text;

               ////Run
               //int result = command.ExecuteNonQuery();

               ////Đóng
               //m_dbConnection.Close();

               //return result;
        }
        // End Checkduplicaterows
        public int Insert(DatabaseHelper help)
        {
            //command.Parameters.Add(new SqlParameter("@Ten_kho", Ten_kho));

               // insert
               try
               {
               var t = new DM_Don_vi_tinh //Make sure you have a table called test in DB
               {
                   ID_Don_vi_tinh = this.ID_Don_vi_tinh,
                   Ten_don_vi_tinh = this.Ten_don_vi_tinh,
                   // ID = Guid.NewGuid(),

               };

               help.ent.DM_Don_vi_tinh.Add(t);
               help.ent.SaveChanges();
               return 1;
               }
               catch (Exception ex)
               {
               return 0;

               }
        }